Re: USB media install has wrong partition
Hi,
i wrote:
> > You could even use program fdisk to delete partition entry 2 in the ISO
mick crane wrote:
> never really understanding this.
> If mount iso as loopback does it show up in fdisk ?
No loopback is needed. fdisk will operate directly on the ISO image file
as it would operate on the USB stick.
A partition table is just a bunch of bytes at some predifined position.
In case of MBR (aka "DOS") partition table, the position is from byte 446
of the file or device to byte 509. Essential is the "magic number" at
bytes 510 and 511. If those bytes say 0x55 and 0xAA, then BIOS, EFI, and
partition editors will accept the 512 bytes as Master Boot Record.
https://en.wikipedia.org/wiki/Master_boot_record
In bytes 446 to 509, there are 4 partition entry slots of 16 bytes each.
If you set all 16 bytes from 446+16 to 446+31 to the value 0, then the
second partition slot will be considered as unused. Thus partition 2 will
not be to see any more, although its data (somewhere deep in the ISO)
will still be there and unchanged.
Program fdisk would be willing to do the zeroing. But you could also
let dd copy 16 bytes from /dev/zero to the partition entry:
dd if=/dev/zero bs=1 seek=462 count=16 of=...ISO.or.USB.stick...
Goal is to take away the entry point by which EFI would recognize the
EFI System Partition, where it would find its start program.
Because the MBR x86 machine code program at bytes 0 to 445 stays unchanged,
EFI might decide to fall back to legacy mode, and execute those bytes
as start program.
This might be the mechanism which brings on some Apple machines success
with the "mac" ISOs: debian-mac-*-amd64-netinst.iso.
Those ISOs bear no EFI System Partition.
So alternatively to deleting partition 2 from a normal netinst ISO,
one may try a Debian "mac" ISO.
But John already stated that he wants EFI native, not BIOS emulation.
So for him, this is not an option.
Have a nice day :)
Thomas
Reply to: