Boot Process
1. non-UEFI boot process
- You push the power button and the CPU runs the power-on self-test (POST) to determine if any hardware is damaged
- The CPU runs hard-wired firmware instructions which have been stored on ROM or NVRAM. These instructions are the BIOS (Basic Input-Output System). The BIOS checks each connected device in a pre-determined order, looking for a Master Boot Record (MBR). The MBR is 440 bytes and contains a partition table and a first-stage bootloader that calls the second stage bootloader
- The second stage bootloader, e.g. GRUB, launches the actual bootloader.
- This bootloader is OS specific and loads the kernel of the operating system
2. UEFI boot process
- Same as non-UEFI boot process. Power button –> POST, etc.
- UEFI initializes the hardware
- Firmware reads the boot entries in NVRAM to determine which EFI application to run and where. EFI applications sit on a GPT partition on disk, usually mounted on
/efi
. Note that the OS can read and write to this file system once it is mounted. - Firmware (that follows the UEFI spec) launches the EFI application, namely the OS-specific boot loader
Note that the non-UEFI process relies on some "special sauce". In particular, the MBR needs to be in a small area at the beginning of the disk and be formatted a certain way. In contrast, the UEFI spec requires that the hardware be able to read some type of file system, e.g. FAT32, so that it can access the EFI partition. This partition can be much bigger than MBR and support much more sophisticated configs.