Quote:
Originally Posted by
uiop44
[...]
How does the boot process work? Someone please correct this if this is wrong...
1. BIOS ROM reads MBR of 1st disk
2. MBR reads boot sector of active (primary) partition (the one with the boot flag)
3. Bootloader on that partition boots the OS it was designed for
[...]
Basically correct so far.
Quote:
Originally Posted by
uiop44
You can have up to 4 partitions and hence 4 OS's specified to the MBR... these are the four 16 byte table entries often called the partition table. They're tacked onto the MBR. Selecting a partition (OS) to boot from is as easy as setting a flag (0x00 --> 0x80 at offset 0x000) in this table.
One correction: you can have 4
primary/extended partitons when using DOS disklabels. Each extended can have up to 4 logical partitions. BSD disklabels allow for up to 8 partitons/slices, but that would probably break Windows booting.
Quote:
Originally Posted by
uiop44
[...]
You have to insert this (foreign) bootloader into the process, between steps 2 and 3
The MBR has to find the foreign bootloader
I do not understand exactly how that works
[...]
When you install the bootloader (eg GRUB) into the partitions boot section, then yes, the MBR has to find the bootloader. If you install it into the MBR, however, it's this (simplified) scheme
- Load the bootloader (GRUB/LILO/...)
- Select the OS you want to boot & that the bootloader knows about
- The bootloader then loads the usual startup code from the partitions bootsector
GRUB has the added bonus that it knows about filesystems and can read it's configuration from there, meaning you can modify and use it without having to reinstall the bootloader (as was the case with LILO).
Quote:
Originally Posted by
uiop44
There is a simpler more direct way
If you are only booting a few OS's and have the disk space to create a few primary partitions, why be so indirect when booting? Make the partition you want active and let the boot process proceed as it is expected to do... by the people who develop these OS's.
Bootloaders usually don't interfere with this. As soon as the user made his/her selection, control is handed back to the OS for the booting process. Said OS isn't even aware that there was a bootloader involved.