Goes for RAMdisk, too. I got a new little computer this week; seeing as how all 
my UEFI boxes are Intel, I went AMD. Diskless, using the NIC to access CAINE on 
netboot.xyz, fails initramfs:



losetup: /cdrom/casper/root.squashfs: Warning: file does not fit into a 
512-byte sector; the end of the file will be ignored.



New DDR5 mobo, no CSM. YMMV by firmware, but this looks to me like an endian 
issue. What doesn't fit, is one byte of extra padding, which breaks the 
checksum. Searching the error text yields much discussion about offsets (of 
physical storage media not RAMdisk). 64K sector alignment, of the .img file, 
solved the problem when I re-created the issue with an .img on my router. OS 
doesn't matter.



A couple other distros exhibit the same behavior, in that they work on Intel 
firmware but not AMD, Insyde vs. AMI UEFI.


-Eric







---- On Mon, 10 Jun 2024 10:24:19 -0700 Eric J Bowman via illumos-discuss 
<[email protected]> wrote ---



With few exceptions, 'mkisofs -pad' behaves the same way across tools in that 
it's an arbitrary, static value. The others dial the wrong number. Here's how 
I've partitioned my 1/2TB boot drive:



8.00 MiB

8.00 GiB

64.00 MiB

32.00 GiB

320.00 MiB

256.00 GiB

96.00 GiB

64.00 GiB

8.00 MiB



What those all have in common, is a byte count that's a multiple of 65536. If 
your partitioning yields x.00, x.25, x.50 or x.75, your sector alignment is 4K, 
8K, or 16K (not in that order, just sayin'). This is important when creating a 
ZFS filesystem -- gotta account for the offset. On my setup, a root pool w/ 8K 
and a zone pool of 16K have the same offset as a storage pool with a 64K 
blocksize -- zero. What's the offset for 4K Windows/Linux partitions on the 
same drive? Zero.



Suggest new interop guideline in general -- partition in MiB/GiB using values 
which are a power of 2. Anyone got any drives laying around they need 
partitioned? lol, so easy now... if 'mkisofs -pad' behavior were to be "pad to 
multiple of 65536" would it cause anyone any harm?



-Eric






https://illumos.topicbox.com/latest / illumos-discuss / see 
https://illumos.topicbox.com/groups/discuss + 
https://illumos.topicbox.com/groups/discuss/members + 
https://illumos.topicbox.com/groups/discuss/subscription 
https://illumos.topicbox.com/groups/discuss/Te6d81d754118b912-M772bc4944a71b200edc4b174
------------------------------------------
illumos: illumos-discuss
Permalink: 
https://illumos.topicbox.com/groups/discuss/Te6d81d754118b912-M7f76120a4f6ff8dbacf6f388
Delivery options: https://illumos.topicbox.com/groups/discuss/subscription

Reply via email to