Pcornel
Linux

Boot Process

Cheat sheet · https://pcornel.dk/topic.php?topic=2727

Back to the Topic

Answer

The Linux boot process: firmware (BIOS/UEFI) → bootloader (GRUB) → kernel with initramfs → the real root filesystem is mounted → systemd (PID 1) starts units until the default target is reached.

Remember

Identify the last stage reached: no GRUB menu → firmware/disk; GRUB error → bootloader; kernel panic → kernel/initramfs; emergency shell → mount or fstab; login missing → services. journalctl -b -1 shows the previous (failed) boot if the journal is persistent.

First checks

  • systemctl is-system-running — running, degraded or starting
  • systemd-analyze — boot time per stage
  • journalctl -b -p err — errors in this boot
  • journalctl --list-boots — previous boots
  • cat /proc/cmdline — kernel command line used

Commands

journalctl -xb

Verify in this order

firmware → bootloader → kernel + initramfs → root mounted → systemd → default target

Where it usually breaks

First mismatch in persistent unit/config/generator → dependency/order graph → systemd state → process/cgroup → socket/resource dependency → journal → consumer check; preserve identity/native diagnostic/pre-state before mutation.

Read-only verification commands unless stated otherwise. Confirm syntax for your platform and release. Full reference: https://pcornel.dk/topic.php?topic=2727

Confirmation

Confirm action

Continue?