Part II · Your system
20. Boot
hub
From power button to login prompt: firmware, bootloader, kernel, init.
On your machine
$ atfq boot Firmware UEFI · Secure Boot on Kernel 6.12.48-amd64 Cmdline BOOT_IMAGE=/vmlinuz-6.12.48-amd64 root=UUID=3f1c2a9e-8b7d-4e21-9c55-0a6b2d7e9f10 ro rootflags=subvol=@ quiet splash Init systemd · default target graphical.target Loader systemd-boot 256.4 · 1 unified kernel image(s) Up 3 days, 4 h
An example: Alice's laptop, one of the test machines. In your terminal, this block shows your own machine, read live.
Commands
systemd-analyze- how long the last boot took, by stage 20.1
systemd-analyze blame- services, slowest first
journalctl -b -p err- errors logged since this boot 22.2
systemctl get-default- the target the system boots into 22.1
efibootmgr- UEFI boot entries and their order
uname -r- the running kernel
Paths
/proc/cmdline- options the kernel was started with
/boot- kernels and initramfs images
/etc/default/grub- GRUB settings, kernel options included
Cards
- 20.1From firmware to initThe firmware (UEFI or BIOS) checks the hardware and starts a bootloader from disk.
- 20.2The kernel command lineThe kernel command line is the list of options the bootloader passes to the kernel: which disk is root, quiet or verbose boot, driver settings.
- 20.3GRUB vs systemd-boot vs UKIGRUB is the classic bootloader: menus, many filesystems, BIOS and UEFI. Its configuration is generated (grub.cfg).
- 20.4systemd targetsA target is a stage the system can reach. multi-user.target: text mode with network and services. graphical.target: the same plus a login screen.