UP | HOME

Boot Process

1 non-UEFI boot process

  1. You push the power button and the CPU runs the power-on self-test (POST) to determine if any hardware is damaged
  2. 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
  3. The second stage bootloader, e.g. GRUB, launches the actual bootloader.
  4. This bootloader is OS specific and loads the kernel of the operating system

2 UEFI boot process

  1. Same as non-UEFI boot process. Power button –> POST, etc.
  2. UEFI initializes the hardware
  3. 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.
  4. 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.

3 Sources