Hi,
turdus wrote:
Octocontrabass wrote:
most BIOSes only allow AH=42h if the first sector is a "valid" MBR
Where did you get such a nonsense? Let's make this clear: AH=42h reads a sector from disk to memory, nothing more, nothing less.
Sadly, it's true.
What happened was that real floppy disks were never large enough to require "int 0x13 extensions", so most BIOSs never bothered supporting "int 0x13 extensions" for floppy disks. Also, hard disks weren't considered removable.
Then CD came along. Originally they weren't bootable at all. Eventually "El Torito" happened, where the media itself tells the BIOS if the CD should emulate a floppy (without "int 0x13 extensions") or emulate a hard disk (with "int 0x13 extensions, but where removable media is assumed to be a "non-removable device") or do no emulation at all (which requires software specifically designed to boot from CD).
Then USB came along. BIOS manufacturers weren't too sure if USB flash should emulate a floppy disk (because it's removable media) or emulate a hard disk (because it's larger than a floppy). A lot of BIOSs decided to support both possibilities - e.g. emulate a floppy (without "int 0x13 extensions" just like a real floppy) or emulate a "not expected to be removable" hard disk (with "int 0x13 extensions").
Some of these BIOSs had an option in their configuration screen to select between emulating floppy and emulating hard disk. Of course that was annoying for users. To fix that problem some BIOS manufacturers decided it'd be fun to auto-detect if the USB should emulate floppy or emulate hard disk. However, it's not like "El Toritio" where there's a sane way to determine what type of device the media should emulate, so they just used the awesome power of stupidity as an alternative.
Of course real floppy disk hardware sucks (no easy way to detect how media was formatted) so Microsoft invented the BPB as a work-around, and everyone expected a (formatted) floppy disk to have BPB. Nobody ever bothered partitioning floppy disks (they were too small). Therefore, for USB, for some BIOSs; if the USB flash has something that looks like a BPB and/or doesn't have something that looks like a partition table; then assume it should emulate a floppy disk (don't bother supporting "int 0x13 extensions" and do support device removal correctly).
Hard disks where mostly always partitioned (even if it's a single partition covering almost all sectors) and the MBR never really needed a BPB (MBR is not the first sector of a FAT partition). Therefore, for USB, for some BIOSs; if the USB has something that looks like a partition table and/or doesn't have something that looks like a BPB; then assume it should emulate a hard disk (do support "int 0x13 extensions", but don't bother supporting device removal correctly).
Over time, USB flash sizes grew and floppy became much less popular. Now it seems silly to emulate a floppy at all, and silly not to support "int 0x13 extensions". I wouldn't be surprised if almost all modern computers just assume USB should emulate a hard disk; but old computers still exist.
Mostly, I'd recommend making sure your bootable USB does not have anything that looks like a valid BPB and does have something that looks like a valid partition table, just in case someone wants to use it to boot an older computer. More specifically, with UEFI looming, I'd recommend not having a BPB and using a hybrid "MBR + GPT" partitioning scheme.
Cheers,
Brendan