How does the Linux boot process work?
Answer
The Linux boot process: (1) BIOS/UEFI performs POST, locates the bootloader on the boot device. (2) Bootloader (GRUB2) loads the Linux kernel and initramfs into memory. (3) Kernel initialization: decompresses itself, initializes hardware, mounts the initial RAM filesystem (initramfs). (4) initramfs: provides a minimal root filesystem with tools to mount the real root filesystem (handles encryption, RAID, LVM). (5) Init process (PID 1): kernel starts systemd (or legacy SysV init). (6) systemd activates targets (runlevels): mounts filesystems, starts services, brings up networking, launches getty (login). The whole process is traceable with systemd-analyze blame and dmesg.
Previous
What is the difference between login and non-login shells?
Next
What is systemd and how do you use it?