The boot process

03/11/2021

In this article, I'll describe how the boot process works focusing on three core components(firmware, bootloader, partition table) of boot process wich need to be understood in order to configure a multiboot system and troubleshoot boot problems.

How the boot process works

Becouse "A picture is worth more than a thousand words" I think it is helpfull to ilustrate a high level overview of main components that interacts during boot process.


diagram: d1


The takeaway from diagram d1 is that the is the pice of software trigered whem the power button is pressed. It performs a set of tasks required to turn on the system and passes control to the which can pass the control further either to a either to the if the os supports to be booted directly.
The is used to store data about how partitions are oraganized on disk, depending on your firmware you may want to use different pacrtition tables(f.e. UEFI require GPT while BIOS can theoreticaly work with both MBR and GPT but this vary form one bios implementation to other, see this), also keep in mind that GPT has some advantages over MBR.
Both UEFI and BIOS use a partition table to find the location of thethe secondary bootloader;
The is used becouse it gives more flexibility( f.e. understands more file sytems than the firmware, you can customize it easyer) because it resids on disk and overwriting it is not as dangerous/hard as overwriting the firmware wich may leave your system in an unusable state as long as you do not have a copy of the firmware available and you are unwilling/unable to solder wires directly on your motherboard.
If you do not care about this flexibility you can make the primary bootloader of the firmware to pass the execution controll straight to to OS, Linux support this kind of feature if it is booted using UEFI.

The OS is dependent of the firmware that is trying boot him so alway make sure that the specific version of the os you intend to install is compatible with your firmware. Both UEFI and BIOS are distinct1 pieces of firmware which are responsable to "perform hardware initialization during the booting process" and "provide runtime services for operating systems and programs";

External resources

Helpfull resources that can be used to install a bootloader/bootmanager can be found at:
Most of the information exposed above are extrracted from the folowing sources, so if you want a more detailed overvirew of each component and transition ilustrated in diagram d1, pleas see these resources:

Footnotes

  1. It is a common misconception to use the term "BIOS" when refering to firmware like UEFI, keep in mind that both BIOS and UEFI are firmware;