Linux Boot Process — Trivia & Interesting Facts¶
Surprising, historical, and little-known facts about the Linux boot process.
The BIOS was designed in 1975 and survived until 2020¶
The Basic Input/Output System was created by Gary Kildall for CP/M in 1975. IBM adopted it for the PC in 1981, and it remained the dominant firmware interface for nearly 40 years. UEFI (Unified Extensible Firmware Interface) began replacing BIOS in 2005, but legacy BIOS boot was not officially deprecated by major vendors until around 2020.
GRUB2 is actually a small operating system¶
GRUB2 (GRand Unified Bootloader 2) includes its own filesystem drivers, a command-line shell, scripting language, network stack, and module system. It can read ext4, XFS, Btrfs, and even NTFS filesystems directly without Linux kernel involvement. This complexity is why GRUB2's configuration file (grub.cfg) is auto-generated — it is too intricate to maintain by hand reliably.
The Linux kernel decompresses itself before it can even start¶
The kernel image (vmlinuz) is a compressed binary. The boot process involves a tiny decompression stub that runs first, extracting the real kernel into memory. Modern kernels use various compression algorithms — gzip, bzip2, lzma, xz, lz4, or zstd — each trading compression ratio against decompression speed. On embedded systems, decompression can take several seconds.
PID 1 is special — if it dies, the kernel panics¶
The init process (PID 1) is the ancestor of all user-space processes. The Linux kernel treats PID 1 uniquely: it is immune to signals that would kill other processes (SIGKILL, SIGTERM are ignored unless PID 1 installs its own handlers), and if PID 1 exits for any reason, the kernel immediately panics and halts the system.
systemd replaced SysVinit in a controversial migration that took a decade¶
Lennart Poettering announced systemd in 2010, and it became the default init system in Fedora 15 (2011), Arch Linux (2012), Debian 8 (2015), and Ubuntu 15.04 (2015). The transition was one of the most contentious debates in Linux history, with Devuan being forked specifically to maintain a systemd-free Debian.
The initramfs is a complete Linux filesystem loaded into RAM¶
The initial RAM filesystem (initramfs) is a compressed cpio archive that the kernel unpacks into a tmpfs. It contains essential drivers, busybox utilities, and scripts needed to find and mount the real root filesystem. Without initramfs, the kernel would need every possible storage driver compiled in rather than loaded as modules.
Secure Boot uses cryptographic signatures to prevent rootkits¶
UEFI Secure Boot, mandated by Microsoft for Windows 8 certification in 2012, verifies that each stage of the boot process is cryptographically signed. Linux distributions either sign their bootloaders with Microsoft's key (via shim) or use their own keys enrolled in the firmware. This chain of trust from firmware through bootloader to kernel prevents persistent boot-level malware.
The kernel ring buffer captures boot messages before any filesystem exists¶
dmesg reads the kernel ring buffer, a fixed-size circular buffer (typically 256 KB to 1 MB) in kernel memory. It captures hardware detection, driver initialization, and error messages from the very first moment the kernel starts executing — before syslog, journald, or any logging daemon is running.
systemd can boot a modern Linux system in under 2 seconds¶
systemd's parallel service startup, socket activation, and aggressive dependency management can bring a system from kernel handoff to login prompt in under 2 seconds on SSD-equipped hardware. The systemd-analyze tool provides precise timing breakdowns, and systemd-analyze blame identifies the slowest services in the boot sequence.
The bootloader lives in the first 440 bytes of the disk (in legacy BIOS mode)¶
In the MBR (Master Boot Record) partitioning scheme, the bootloader's first stage must fit in the first 440 bytes of the disk — less than half a kilobyte. GRUB2 works around this by using a three-stage boot process: stage 1 in the MBR loads stage 1.5 from the gap between the MBR and the first partition, which then loads the full stage 2 from the filesystem.