The Linux startup process is like a relay race with 4 runners, each passing the baton to the next until the system is fully operational.
┌─────────────────────────────────────────────────────────────────┐
│ LINUX BOOT SEQUENCE │
└─────────────────────────────────────────────────────────────────┘
Power On
↓
┌──────────────────┐
│ 1. BIOS/UEFI │ ← Hardware Manager
│ (Firmware) │ • Checks hardware (POST)
└────────┬─────────┘ • Finds bootable device
↓ • Loads bootloader
│ 2. GRUB │ ← Boot Menu
│ (Bootloader) │ • Shows OS choices
└────────┬─────────┘ • Loads kernel + initramfs
↓ • Passes boot parameters
│ 3. Kernel │ ← Operating System Core
│ (vmlinuz) │ • Initializes hardware
└────────┬─────────┘ • Mounts root filesystem
↓ • Starts init system
│ 4. systemd │ ← Service Manager
│ (Init System) │ • Starts all services in parallel
└────────┬─────────┘ • Reaches target state
↓ • System ready!
Login Prompt
or GUI
What it is: Firmware chip on the motherboard
What it does:
✅ POST (Power-On Self-Test) - Verifies CPU, RAM, keyboard, etc.
✅ Detects devices - Finds hard drives, USB, network cards
✅ Locates bootloader - Finds GRUB in MBR or ESP partition
✅ Hands off control - Starts the bootloader
Key files/locations:
Stored in motherboard chip
Settings: Press F2/F10/Del during boot
Time taken: ~2-5 seconds
What it is: GRand Unified Bootloader
✅ Shows boot menu - Choose OS or kernel version
✅ Loads kernel - Reads /boot/vmlinuz-*
/boot/vmlinuz-*
✅ Loads initramfs - Reads /boot/initramfs-* or /boot/initrd.img-*
/boot/initramfs-*
/boot/initrd.img-*
✅ Passes parameters - Sends boot options to kernel
✅ Transfers control - Starts the kernel
/boot/grub/grub.cfg - Main configuration
/boot/grub/grub.cfg
/etc/default/grub - Settings (edit this!)
/etc/default/grub
/boot/vmlinuz-* - Kernel image
/boot/initramfs-* - Initial RAM filesystem
Key commands:
sudo update-grub # Update GRUB config sudo grub-install /dev/sda # Install GRUB
sudo update-grub
# Update GRUB config
sudo grub-install /dev/sda
# Install GRUB
Time taken: ~3-5 seconds
What it is: Core of the Linux operating system
✅ Decompresses itself - Unpacks compressed kernel
✅ Initializes hardware - CPU, memory, devices
✅ Loads drivers - From initramfs (temporary root)
✅ Mounts root filesystem - Real root (/) partition
✅ Starts systemd - First process (PID 1)
/boot/vmlinuz-* - Compressed kernel
/boot/initramfs-* - Temporary filesystem with drivers
/proc/cmdline - Boot parameters used
/proc/cmdline
/proc/version - Kernel version info
/proc/version
uname -r # Show kernel version dmesg # View kernel messages journalctl -k # View kernel logs
uname -r
# Show kernel version
dmesg
# View kernel messages
journalctl -k
# View kernel logs
Time taken: ~5-10 seconds
What it is: First process (PID 1), service manager
✅ Starts as PID 1 - First user-space process
✅ Reads configuration - Determines default target
✅ Starts services in parallel - Network, logging, etc.
✅ Reaches target state - multi-user or graphical
✅ System ready! - Login prompt appears
/etc/systemd/system/ - Custom service files
/etc/systemd/system/
/lib/systemd/system/ - Distribution service files
/lib/systemd/system/
/etc/systemd/system/default.target - Default target (symlink)
/etc/systemd/system/default.target
systemctl status # System status systemctl get-default # Show default target systemctl list-units # List all units journalctl -b # View boot logs systemd-analyze # Boot time analysis
systemctl status
# System status
systemctl get-default
# Show default target
systemctl list-units
# List all units
journalctl -b
# View boot logs
systemd-analyze
# Boot time analysis
Time taken: ~10-30 seconds (depends on services)
Time Stage What's Happening
━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━
0s [Power On] Press power button
2s [BIOS/UEFI] 🔍 Checking hardware...
✓ CPU OK
✓ RAM OK
✓ Disk found
5s [GRUB] 📋 GRUB Menu (5 sec timeout)
→ Loading kernel...
→ Loading initramfs...
8s [Kernel] 🧠 Kernel starting...
✓ Hardware initialized
✓ Drivers loaded
✓ Root filesystem mounted
13s [systemd] 🚀 Starting services...
✓ networking.service
✓ sshd.service
✓ NetworkManager.service
✓ gdm.service (if GUI)
25s [Ready] ✅ System ready!
→ Login prompt or GUI
# BIOS/UEFI
[ -d /sys/firmware/efi ] && echo "UEFI" || echo "BIOS"
# Bootloader (GRUB)
cat /proc/cmdline # Boot parameters used
ls /boot/vmlinuz-* # Installed kernels
# Kernel
uname -r # Current kernel version
dmesg | head -20 # Early kernel messages
lsmod # Loaded kernel modules
# systemd
systemctl status # System state
systemctl --failed # Failed services
journalctl -b # This boot's logs
systemd-analyze blame # Service start times
Problem
Stage
Solution
"No bootable device"
BIOS/UEFI
Check boot order in BIOS settings
"GRUB error"
GRUB
Reinstall GRUB: grub-install /dev/sda
grub-install /dev/sda
"Kernel panic"
Kernel
Boot with older kernel from GRUB menu
"Service failed"
systemd
Check logs: journalctl -u service_name
journalctl -u service_name
Black screen
Any
Add nomodeset to kernel parameters
nomodeset
# Single-user/Rescue mode
Add: systemd.unit=rescue.target
# Multi-user (no GUI)
Add: systemd.unit=multi-user.target
# Emergency mode (minimal)
Add: systemd.unit=emergency.target
# Verbose boot (see all messages)
Remove: quiet splash
Power → BIOS (hardware check) → GRUB (load kernel) →
Kernel (initialize system) → systemd (start services) → Login
Zuletzt geändertvor einem Monat