Describe the Linux boot process from BIOS to init.

Answer

The boot sequence: 1. BIOS/UEFI — firmware runs POST (power-on self test), detects hardware, and loads the bootloader from the boot device. 2. GRUB2 — the bootloader presents a menu (or boots immediately), loads the kernel image (vmlinuz) and the initial RAM disk (initrd/initramfs) into memory. 3. Kernel initialization — the kernel decompresses itself, initializes hardware subsystems (memory, interrupts, I/O), mounts the initramfs as a temporary root filesystem, and runs the early userspace tools to locate and mount the real root filesystem. 4. Real root filesystem mounted — the kernel pivots to the real root and executes /sbin/init (PID 1). 5. systemd (init) — PID 1 reads unit files, resolves dependencies, and starts all enabled services in parallel according to the target (e.g., multi-user.target or graphical.target). Understanding this sequence is essential for diagnosing boot failures and configuring custom boot parameters.