[draft]The Linux boot process
System initialization:
Under BIOS:
- System switched on - Power-on self-test or POST process
- After POST, BIOS initializes the necessary system hardware for booting (disk, keyboard controllers etc.)
- BIOS launches the first 440 bytes (Master Boot Record) of the first disk in the BIOS disk order
- The MBR boot code then takes control from BIOS and launches its next stage code (if any) (mostly boot loader code)
- The launched actual boot loader
Under UEFI:
- System switched on. The Power On Self Test (POST) is executed.
- UEFI firmware is loaded. Firmware initializes the hardware required for booting.
- Firmware reads the boot entries in the firmware’s boot manager to determine which UEFI application to be launched and from where (i.e. from which disk and partition).
- Firmware launches the UEFI application.
- This could be the Arch kernel itself (since EFISTUB is enabled by default).
- It could be some other application such as a shell or a graphical boot manager.
- Or the boot entry could simply be a disk. In this case the firmware looks for an EFI System Partition on that disk and tries to run the fallback UEFI application \EFI\BOOT\BOOTX64.EFI (BOOTIA32.EFI on 32-bit systems). This is how UEFI bootable thumb drives work.
Thanks to the excellent ArchLinux documentation we know that in most of the case when you switch the system on the firmware on your motherboard takes care about your hardware and will launch the boot loader that in the majority of the case is GRUB2.
initrd, init first process.