Pcornel
Linux · Boot Process

Linux Kernel

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

Back to the Topic

Answer

The Linux kernel image (vmlinuz) is loaded by the bootloader, initialises hardware and memory, runs the initramfs, mounts the real root and starts /sbin/init (systemd).

Remember

Panics such as "VFS: Unable to mount root fs" usually mean a wrong root= parameter or missing storage drivers in the initramfs. Boot the previous kernel from the menu to recover, then fix or remove the broken one.

First checks

  • 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 -k -b
mount -o remount,rw /

Verify in this order

kernel loaded → hardware initialised → initramfs runs → root mounted → init started

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=2731

Confirmation

Confirm action

Continue?