Boot process: UEFI, GRUB, initramfs and kernel
In short: At start the firmware (UEFI) loads the bootloader (for example GRUB), which loads the kernel and the initramfs. The kernel then starts the init system (systemd), which brings up services and the desktop.
In more detail: The initramfs is a small temporary file system in memory with drivers the kernel needs to mount the real disk (encrypted, RAID, LVM).
In detail
- UEFI/BIOS: hardware self-test, looks for boot medium (EFI system partition).
- Bootloader: GRUB, systemd-boot, rEFInd or Limine shows a menu.
- Kernel + initramfs:
vmlinuz-6.xandinitramfs-6.x.imgfrom/boot. - Mount the root file system: password for encrypted disk, activate LVM.
- Init (PID 1): systemd starts services, see systemd and init systems.
- Display manager and desktop, see Display manager and login screen.
- GRUB: config
/etc/default/grub, thensudo update-grub(Debian) orgrub-mkconfig -o /boot/grub/grub.cfg. - Kernel parameters: extra options like
quiet splash,nomodeset,init=/bin/bash. - Rebuild initramfs:
update-initramfs -u(Debian),dracut --force(Fedora),mkinitcpio -P(Arch). - Secure Boot: checks signatures of bootloader and kernel (shim).
- Error: “Kernel panic – not syncing: VFS: Unable to mount root fs” means the root file system was not found.
- Dual boot: GRUB or rEFInd lists Windows and Linux.
See also: The Linux kernel at a glance, Kernel panic and oops