The Linux Boot Process Explained: From Firmware to systemd

Follow a Linux machine from power-on to login: UEFI/BIOS, GRUB, kernel, initramfs, systemd and targets, with the commands to inspect each stage.

Published November 27, 2026

Every time you press the power button, a Linux machine runs through a precise relay race: firmware hands off to a bootloader, the bootloader loads the kernel, the kernel unpacks an initramfs, and finally systemd starts your services. When boot fails, knowing which runner dropped the baton tells you exactly where to look.

The concept

Stage one is firmware. Older PCs use BIOS, which reads the first 512-byte sector of the boot disk (the MBR) and jumps to it. Modern machines use UEFI, which understands partitions and filesystems natively and loads a bootloader file (for example \EFI\ubuntu\shimx64.efi) from the FAT-formatted EFI System Partition. UEFI also implements Secure Boot, verifying signatures before running anything.

Stage two is the bootloader, usually GRUB 2. It shows the menu, reads its configuration, loads the kernel image (vmlinuz) and the initial RAM filesystem (initrd/initramfs) into memory, and passes the kernel command line such as root=UUID=... ro quiet.

Stage three is the kernel. It decompresses itself, initialises CPU, memory and built-in drivers, then unpacks the initramfs and runs its /init. The initramfs exists to load whatever is needed to reach the real root filesystem: storage drivers, LVM, RAID, LUKS decryption, network roots. Once the real root is mounted, control passes to /sbin/init, which on almost all distributions is systemd, and systemd brings the system up to its default target.

The boot relay

  1. Firmware (UEFI/BIOS): POST, find boot entry, Secure Boot checks
  2. Bootloader (GRUB): menu, load vmlinuz + initramfs, pass cmdline
  3. Kernel: hardware init, mount initramfs as temporary root
  4. initramfs: load storage drivers, unlock LUKS, assemble LVM/RAID, mount real root
  5. systemd (PID 1): mount filesystems, start units, reach default.target
The five handoffs of a Linux boot.

Who hands off to whom

UEFIGRUBKernelinitramfssystemdload grubx64.efivmlinuz + cmdlinerun /initreal root mountedswitch_root, exec /sbin/init
Control passes from component to component during boot.

What fails where

StageTypical failureWhere to look
FirmwareNo bootable device, Secure Boot violationFirmware setup, efibootmgr -v
GRUBgrub rescue> prompt, missing kernelgrub.cfg, /boot partition
KernelKernel panic: VFS unable to mount rootroot= parameter, initramfs drivers
initramfsDropped to (initramfs) shell, LUKS/LVM issuesRebuild initramfs, check UUIDs
systemdEmergency mode, failed units, fstab errorsjournalctl -xb, systemctl --failed

Measuring each stage

systemd-analyze
Startup finished in 6.1s (firmware) + 2.4s (loader) + 1.9s (kernel) + 3.2s (initrd) + 8.7s (userspace) = 22.3s
systemd-analyze blame | head -3
5.102s NetworkManager-wait-online.service
1.311s snapd.service
812ms dev-nvme0n1p2.device
cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-6.8.0-49-generic root=UUID=3f1c... ro quiet splash
systemd-analyze breaks boot time down by stage.

Practical examples

Inspect UEFI boot entries

Shows the boot order and which .efi file each entry runs.

sudo efibootmgr -v
# Boot0001* ubuntu  HD(1,GPT,...)/File(\EFI\ubuntu\shimx64.efi)

Look inside the initramfs

See which drivers and scripts will run before root is mounted.

lsinitramfs /boot/initrd.img-$(uname -r) | grep -E 'nvme|lvm|cryptsetup' | head
# RHEL: lsinitrd /boot/initramfs-$(uname -r).img

Read logs from the previous boot

Persistent journal required (Storage=persistent).

journalctl -b -1 -p err
journalctl --list-boots | tail -3

Common mistakes

  • Assuming GRUB problems and kernel problems are the same thing. A grub rescue prompt and a kernel panic point to completely different stages.
  • Changing disk layout or UUIDs without updating /etc/fstab and the initramfs.
  • Disabling Secure Boot permanently to work around one unsigned module instead of signing it.
  • Blaming slow boot on the kernel when systemd-analyze shows a network-wait service taking most of the time.

Key takeaways

  • Boot goes firmware → bootloader → kernel → initramfs → systemd.
  • UEFI loads .efi files from the EFI System Partition; BIOS reads the MBR.
  • The initramfs exists to mount the real root filesystem.
  • systemd-analyze, journalctl -b and /proc/cmdline are your stage-by-stage debugging tools.

FAQ

What is vmlinuz?

The compressed, bootable Linux kernel image. The z means it is compressed; the kernel decompresses itself at the start of boot.

Is the initramfs always required?

No. If every driver needed to mount root is built into the kernel and there is no LUKS/LVM, the kernel can mount root directly. Distribution kernels use one because their drivers are modular.

What is the difference between a target and a runlevel?

systemd targets replace SysV runlevels: multi-user.target is roughly runlevel 3 and graphical.target roughly runlevel 5.

More Linux articles