Linux Boot Process — From Power-On to Login
Understand each stage of the Linux boot process: BIOS/UEFI, GRUB bootloader, kernel initialization, systemd, and login.
March 28, 20255 min read
linuxsysadminbootgrubsystemd
Boot Stages Overview
| Stage | What Happens |
|---|---|
| BIOS/UEFI | Hardware self-test (POST), finds boot device |
| GRUB | Loads the kernel and initrd into RAM |
| Kernel | Initializes hardware, mounts root filesystem |
| systemd | Starts services, reaches boot target |
| Login | Presents TTY or display manager |
systemd Targets (Runlevels)
| Target | Old Runlevel | Description |
|---|---|---|
poweroff.target | 0 | Shutdown |
rescue.target | 1 | Single-user recovery |
multi-user.target | 3 | Multi-user, no GUI |
graphical.target | 5 | Multi-user with GUI |
reboot.target | 6 | Reboot |
# Check current default target
systemctl get-default
# Change default target
sudo systemctl set-default multi-user.target # CLI only
sudo systemctl set-default graphical.target # With GUIGRUB — Boot Loader
# Update GRUB config (Debian/Ubuntu)
sudo update-grub
# Update GRUB config (Fedora/RHEL)
sudo grub2-mkconfig -o /boot/grub2/grub.cfg
# Edit GRUB settings (timeout, resolution, etc.)
sudo vim /etc/default/grub
# Change: GRUB_TIMEOUT=5
sudo update-grubIf a system won't boot, you can access rescue.target from the GRUB menu by appending systemd.unit=rescue.target to the kernel line.
Quick Check
What is the first process started by the Linux kernel after boot?
Exercise
Check your system's default boot target and view the current boot's journal messages.