Explore the Linux boot process, from BIOS/UEFI to user login.
Almost every software engineer has used Linux before, but only a handful know how its Boot Process works. Let’s dive in.
When we turn on the power, BIOS (Basic Input/Output System) or UEFI (Unified Extensible Firmware Interface) firmware is loaded from non-volatile memory and executes POST (Power On Self Test).
BIOS/UEFI detects the devices connected to the system, including CPU, RAM, and storage.
Choose a booting device to boot the OS from. This can be the hard drive, the network server, or CD ROM.
BIOS/UEFI runs the boot loader (GRUB), which provides a menu to choose the OS or the kernel functions.
After the kernel is ready, we now switch to the user space. The kernel starts up systemd as the first user-space process, which manages the processes and services, probes all remaining hardware, mounts filesystems, and runs a desktop environment.
systemd activates the default. target unit by default when the system boots. Other analysis units are executed as well.
The system runs a set of startup scripts and configure the environment.
The users are presented with a login window. The system is now ready.