Linux OS Internals (50 Qs)•Part 3: Advanced Internals, Scale & Production Patterns (Senior / Lead)
Linux Boot Sequence: From UEFI/BIOS, GRUB2, Kernel Initialization, to systemd PID 1.
senior Levellinux-osAdvanced Internals
In Simple Words:
- Power-On & POST / UEFI: Hardware self-test. UEFI loads the EFI boot manager and executes the bootloader from the ESP partition.
- GRUB2 Bootloader: Presents the OS menu, loads the selected kernel image (
vmlinuz) and the temporary initial RAM filesystem (initramfs) into memory. - Kernel Initialization: Decompresses itself, initializes CPU registers, page tables, interrupts, and drivers from
initramfs, then mounts the real root filesystem (/). - PID 1 (systemd): The kernel executes
/sbin/init(systemd), which launches system target units (multi-user.target,graphical.target), initializes Daemons, mounts fstab entries, and presents the login shell.