Hi,
Debian ISOs are known to boot on the largest number of computers but their
partition layout is a bit weird in order to achieve that bootability.
(Originally invented by Matthew J. Garrett for Fedora.)
See for a short explanation:
https://wiki.debian.org/RepackBootableI ... 64_or_i386The theory is described in
https://dev.lovelyhq.com/libburnia/libi ... ectors.txtSee there
"EL Torito CD booting, for PC-BIOS x86, PowerPC, (old) Mac, EFI."
"Boot Info Table and GRUB2 Boot Info"
(Debian uses ISOLINUX for BIOS. So only "Boot Info Table" applies.)
"Master Boot Record (MBR), for PC-BIOS x86 from (pseudo-) hard disk"
"- SYSLINUX isohybrid for MBR, UEFI and x86-Mac"
(Debian does not provide a HFS+ filesystem image. So the "x86-Mac"
does not really apply.)
Other distros have meanwhile switched to more regular partition layouts
by appending the EFI partition after the end of the ISO 9660 filesystem
and by deciding for either MBR partition table or GPT.
These layouts are more acceptable to partition editors but also leave
behind some oddly programmed firmwares which insist in MBR partition
boot flag or the existence of a GPT. Only one of both can be fulfilled
without bending the various involved specs.
See for example the output of
Code:
xorriso -indev archlinux-2023.12.01-x86_64.iso -report_system_area plain
which marks an appended partition in MBR (but also has an invalid GPT for
luring the most dumbest EFI implementations).
Another example is
Code:
xorriso -indev Fedora-Everything-netinst-x86_64-37-1.7.iso -report_system_area plain
which marks an appended partition by a valid GPT. Further it uses GRUB
as bootloader for BIOS. (See in boot_sectors.txt "GRUB2 Boot Info" and
"- GRUB2 grub-mkrescue MBR".)
If you replace in above commands "plain" by "as_mkisofs" then you will
be shown a best guess about which mkisofs emulation options might be used
for producing an ISO with similar boot lures.
> Obviously two boot loader should be written (one for the BIOS and one
> for the UEFI) The only way I see them being "sort of connected", would
> be that they both read a FS
Yes.
ISOLINUX and GRUB let their boot program for BIOS (i.e. the x86 machine
code in the MBR) jump onto their El Torito boot images for BIOS. That's
why xorriso has to patch the block address of the El Torito image into the
code in the MBR.
This way optical media and USB sticks get booted by nearly the same
bootloader code.
EFI needs a FAT filesystem with /EFI/BOOT/BOOT*.EFI programs. For 64-bit
x86 it is BOOTX64.EFI, for 32-bit x86 it is BOOTIA32.EFI.
The FAT filesystem is then advertised in both boot lures, El Torito
Catalog for optical media and partition table for USB sticks.
This way both media families get booted by exactly the same bootloader
code.
About all distros use in their ISOs GRUB for EFI, because SYSLINUX EFI
has a bug about block size which prevents it from working with optical
media. Knoppix ISOs are an example of SYSLINUX EFI.
(I dimly remember to have seen a patch for fixing that bug.)
Have a nice day
Thomas