The Linux Boot Process (a minified version)

Brian Kepha
2 min readFeb 15, 2024

--

Let me pen down my version of how I understand the Linux boot process. I believe this is as simple as I can break it down for the moment and I do hope it might be able to help you understand the entire process.

BIOS

When you power on your Linux computer, the BIOS (Basic Input Output System ) is copied into RAM. The BIOS performs POST (Power On Self Test) to make sure critical components are available e.g hard drive, ram e.t.c and in perfect condition.

MBR/UEFI Partitions

BIOS then looks into hard drive for the MBR or EFI partition depending on which partition scheme the drive was formatted ,here it will find the bootloader(grub2), load it into memory and pass over control to it.

Bootloader(grub/grub2)

The Linux bootloader will offer an interface to let you choose an alternative boot option including booting other installed OS alongside your main OS. When you choose and select your preferred boot option, the bootloader loads the kernel image and initial ram disk to memory and passes control to it.

Kernel

Kernel image is usually compressed hence the first job is to decompress it after which it does further checks on system hardware and initialize any OS components e.g device drivers and bring them up to full operation.

Initial ramdisk (initrd,initramfs)

In addition to kernel, the bootloader usually loads a file called initial ram disk(initrd, initramfs). This file contains a temporary and minimal file system with some hardware drivers necessary for the system to boot e.g disk controller drivers and boot scripts.Once the drivers are fully loaded,the kernel mounts the real root file system and discards the initial ram disk.

N/B: The initramfs MUST be built individually for each linux system because it contains the specific drivers and protocols needed by hardware and kernel config.

sbin/init

Once kernel sets up hardware and mounts the root file system, it runs the initial process at /sbin/init on the file system which starts other processes to get the system running. The /init is also responsible for keeping the system running as well as shutting it down cleanly.

The init is also responsible for determining what other processes need to be run , this was handled by sysV using scripts but now on modern linux systems, it’s replaced by systemd. And just like that the system is fully booted up and running.

And Voila, we are done.

--

--