Hi,
MadZarx wrote:Qwen you mean I should put the bootloader inside a FAT image and put that inside the ISO for the UEFI?
Would you give me more information about this please?
For "BIOS, no emulation El Torito", the firmware finds a suitable boot catalogue entry, which says the starting sector and number of sectors for the boot loader. Then the BIOS loads those sectors into memory and jumps to it. Once started, the boot loader uses BIOS functions to read raw sectors, and typically contains ISO9660 support (to load more files from the CD).
For "UEFI El Torito", the firmware finds a suitable boot catalogue entry, which says the starting sector and number of sectors for a "FAT system partition image". Then UEFI mounts this "FAT system partition image" and finds a usable boot loader inside it. The boot loaders may load more files from the "FAT UEFI system partition image"; but (instead) they may provide their own ISO9660 support and use UEFI functions to read raw sectors to load more files from the CD.
Now; for El Torito you can have several different boot catalogue entries (e.g. one for "BIOS, no emulation El Torito", one for "UEFI El Torito", one for "PowerPC/OpenFirmware El Torito", etc) with different boot loaders for different architectures; where the firmware will find the correct boot catalogue entry/boot loader to use. Also; for UEFI (in general) you can have several different bootloaders in the "FAT UEFI system partition image" and UEFI will find the right one for the architecture. For example, you could have boot loaders for "32-bit 80x86 UEFI", "64-bit 80x86 UEFI", "itanium UEFI" and "ARM UEFI" all in the same "FAT system partition image".
By combining these, you can have a single CD that supports "80x86 BIOS" and "32-bit 80x86 UEFI" and "64-bit 80x86 UEFI" (and any other different systems, with or without UEFI, that you feel like).
Of course for a "multi-architecture CD"; you're probably going to have some files that are used by all the boot loaders - things like a splash image containing the OS's logo or startup screen, files containing font data, files containing internationalisation information (a set of strings for each different language), etc. The question is, how do all the different boot loaders (with or without UEFI) access the same common files?
There's at least 4 solutions to this:
- the FAT way, where the common files are in the "FAT UEFI system image". In this case boot loaders that don't use UEFI (e.g. for 80x86 BIOS) have to be able to find the "FAT UEFI system image" (e.g. by including that image as a file in the ISO9660 file system) and also have to understand FAT (which is more bloated, more complex and slower to read from). This is easier for boot loaders designed for UEFI (and worse in every way for boot loaders that aren't designed for UEFI).
- the ISO9660 way, where the files are just normal files in the ISO9660 file system. In this case all boot loaders (those that use UEFI and those that don't) have to understand ISO9660 (which is easier for those that don't use UEFI, and faster for all of them).
- the other FAT way, where nothing uses ISO9660 at all and all files (for all architectures) are included in the "FAT UEFI system image". This is a bad idea because normally you want to have things like documentation and installation instructions that other OSs can read on the same CD (e.g. text or HTML files for Windows, Linux, etc).
- the other other way, where nothing uses ISO9660 at all, only UEFI boot loaders are in the "FAT UEFI system image", and you use any file system you like (e.g. design your own) instead of ISO9660 for almost all of the files. This is also a bad idea (same problem as the "other FAT way") but may have potential advantages maybe (e.g. your own file system might be better than ISO9660 and FAT for unknown reason/s - more efficient, support some feature you want, etc).
Additional Notes:
1) When booting from BIOS; your boot loader could auto-detect whether the CPU supports 64-bit or not, and could automatically load a 64-bit kernel (if the CPUs support it) or load a 32-bit kernel.
2) When booting from 32-bit UEFI; your boot loader could auto-detect whether the CPU supports 64-bit or not and decide which kernel to use (just like the BIOS boot loader)
3) If the OS is designed well there should be no reason why BIOS boot loaders and UEFI boot loaders can't start the exact same (32-bit and 64-bit) kernels
This means that you can have a "multi-architecture boot CD" that contains 3 boot loaders (BIOS, 32-bit UEFI and 64-bit UEFI) and 2 kernels (32-bit and 64-bit); and that CD can automatically work (and automatically start the best possible kernel) without any end user hassle at all, on every 80x86 that is capable of booting from CD. It also means that the kernels themselves are part of the "files that are shared by multiple different boot loaders".
Cheers,
Brendan