Skip to content
Back to notes
Systems· 1 min read

Understanding the Linux boot process

BIOS to shell, one stage at a time.

Overview

Every time you press the power button, a remarkable sequence of handoffs happens before you see a shell prompt. Understanding each stage demystifies kernel panics, GRUB misconfiguration, and systemd races.

The stages

  1. BIOS / UEFI — firmware initialises hardware, runs POST, loads the bootloader from the ESP
  2. GRUB — reads /boot/grub/grub.cfg, loads the kernel image (vmlinuz) and initramfs into RAM
  3. Kernel initialisation — decompresses itself, sets up virtual memory, detects CPUs and devices
  4. initramfs — a tiny root filesystem that mounts the real root partition (handles LUKS, LVM, etc.)
  5. PID 1 / systemd — takes over, activates units in parallel based on Wants= / Requires= dependencies
  6. Login shellgetty spawns on TTYs; sddm/gdm on graphical targets

Why this matters

Knowing the boot sequence means you can recover from any broken stage. GRUB won’t load? Boot a live USB and chroot. initramfs panics? Add break=premount to the kernel cmdline and drop into a debug shell.