Re: USB key and lost space
Hi,
Pascal Hambourg wrote:
> I did not have trouble with the Apple partition table except when using
> libparted-based partition editors, but could you explain how you remove it ?
By dd-ing the first 32 bytes from file "isohdpfx.bin" of package "isolinux"
onto the first 32 bytes of the ISO image (as data file with conv=notrunc
or as USB stick).
debian-9.3.0-amd64-netinst.iso has in its MBR the APM signature and a
fake block count which happen to be x86 machine code without undesirable
side effects:
00000000 : 45 52 08 00 00 00 90 90 00 00 00 00 00 00 00 00
00000010 : 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
The first 432 bytes of amd64 and i386 isohybrid ISOs stem from
/usr/lib/ISOLINUX/isohdpfx.bin
which has x86 code that is similarly harmless but does not indicate APM:
00000000 : 33 ed 90 90 90 90 90 90 90 90 90 90 90 90 90 90
00000010 : 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90 90
This jackalope was invented by Matthew J. Garrett.
https://mjg59.dreamwidth.org/11285.html
Of course one may use own useless x86 code to deface APM. Some machine code
knowledge would be precondition, though. Assembler source of isohdpfx.bin
is at
https://github.com/geneC/syslinux/blob/master/mbr/isohdpfx.S
> (Strangely enough, wipefs does not find the GPT)
The GPT in mjg's layout is not valid, because the partition table of the
MBR does not consist of a single partition of type 0xee which starts at
LBA 1.
I meanwhile doubt that it is of any use. The history of mjg's development
indicates that he first started with valid GPT and then ihad to add a MBR
partition of type 0xef for marking the EFI System Partition / Boot Image,
because some machines did not work with the GPT marked EFI partition.
Partition editors like gparted or gdisk detect the presence of the GPT
header block at LBA 1 and then complain about the wrong MBR partition table.
This can be silenced by zeroing bytes 512 to 1023 of the ISO.
A valid GPT can be found in grub-mkrescue ISOs which were produced
while GRUB binary packages for 32-bit EFI and/or 64-bit EFI were installed.
Have a nice day :)
Thomas
Reply to: