Demystifying Linux Boot: Step‑by‑Step Guide to System Startup
This article walks Linux beginners through the complete boot sequence—from POST and BIOS loading, through MBR and GRUB stages, kernel and initrd initialization, to the init process and final login prompt—explaining each component’s role and how the system transitions from power‑on to a usable environment.
For Linux beginners, understanding and mastering the Linux system boot process provides deep insight into the OS and helps diagnose issues. Linux System Boot Process The boot process can be divided into the following steps: POST (Power‑On Self Test) → BIOS loading → Determining boot device (Boot sequence) → Loading Boot Loader → Loading kernel and initializing initrd → Running /sbin/init to initialize the system → Displaying the user login prompt. 1. POST Power‑On Self Test After power‑on, the system performs hardware checks (CPU, memory, motherboard, disks, CMOS, etc.). Fatal faults halt the machine; non‑fatal faults emit beep codes. If no faults are detected, POST completes. 2. Loading MBR and Boot Loader After POST, the CPU reads the BIOS from CMOS and follows the boot sequence to locate a bootable device. It reads the first sector (MBR) of the device, which contains the boot loader (e.g., GRUB), the partition table, and a validity flag. The MBR occupies 512 bytes: 446 bytes for the boot loader, 64 bytes for the partition table (four primary partitions), and 2 bytes for the signature. GRUB loads the kernel into memory. The kernel resides in /boot, but GRUB accesses it directly via the partition identified in the MBR, not through the filesystem. GRUB Loading Stages Stage 1: BIOS loads the first‑stage GRUB from the MBR (446 bytes). Stage 1.5 loads additional files from /boot/grub to recognize filesystem types. Stage 2 loads the kernel. 3. Loading Kernel and initrd GRUB loads the kernel and the initial RAM disk (initrd) into memory. The kernel then detects hardware, loads drivers, mounts the root filesystem, switches to it, and runs /sbin/init. initrd provides a temporary root filesystem containing necessary drivers to mount the real root. 4. Running /sbin/init for System Initialization After the kernel mounts the root filesystem, it starts the first user process, init, which executes /etc/init/rcS.conf and then /etc/rc.d/rc.sysinit. This script performs numerous tasks such as configuring network, mounting devices, starting Plymouth, checking SELinux, initializing hardware, loading custom modules, setting kernel parameters, hostname, RAID, LVM, filesystem checks, quotas, random number generator, and more. 5. Displaying Login Prompt When initialization finishes, init presents the login prompt or graphical login screen. After the user authenticates, the system assigns a UID and GID, completing the boot process.
MaGe Linux Operations
Founded in 2009, MaGe Education is a top Chinese high‑end IT training brand. Its graduates earn 12K+ RMB salaries, and the school has trained tens of thousands of students. It offers high‑pay courses in Linux cloud operations, Python full‑stack, automation, data analysis, AI, and Go high‑concurrency architecture. Thanks to quality courses and a solid reputation, it has talent partnerships with numerous internet firms.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
