Basic Boot Process in Linux
The boot process is the sequence of steps that happens when a computer starts until the Linux operating system becomes ready for use.
1. Power On
- User presses the power button.
- CPU starts executing firmware instructions stored on motherboard.
2. BIOS or UEFI
BIOS
Basic Input Output System
UEFI
Unified Extensible Firmware Interface
These firmware systems:
- Check hardware components
- Detect CPU, RAM, disks, keyboard
- Perform POST (Power-On Self Test)
- Find bootable device
POST (Power-On Self Test)
Checks:
- RAM
- CPU
- Storage devices
- Keyboard and peripherals
If hardware fails, system may show error beeps or messages.
3. Bootloader Stage
The bootloader loads the Linux kernel into memory.
Most Linux systems use:
GNU GRUB
Responsibilities of GRUB
- Shows boot menu
- Select operating system
- Loads Linux kernel
- Loads initramfs/initrd
GRUB Configuration Location
Common files:
/boot/grub/
/boot/grub2/
Main config:
grub.cfg
4. Linux Kernel Loading
After GRUB:
- Linux kernel loads into RAM
- Kernel initializes hardware
- Drivers are loaded
- Root filesystem is mounted
Kernel file example:
vmlinuz
initramfs / initrd
Temporary filesystem loaded during boot.
Purpose:
- Load required drivers
- Prepare root filesystem
- Help kernel access storage devices
5. Init/Systemd Process
After kernel initialization, the first userspace process starts.
Traditionally:
init
Modern Linux systems mainly use:
systemd
Process ID:
PID 1
Responsibilities of systemd/init
- Start system services
- Mount filesystems
- Configure networking
- Start login services
- Manage system targets/runlevels
5. Starting Services
System services start in background.
Examples:
- SSH server
- Network manager
- Database services
- Docker daemon
- Web servers
Example:
sshd
docker
nginx
6. Login Screen or Shell
Finally system provides:
- GUI login screen
- Terminal login shell
User enters:
- Username
- Password
System becomes ready for use.
Linux Boot Flow Diagram
Power On
↓
BIOS / UEFI
↓
POST Check
↓
Bootloader (GRUB)
↓
Linux Kernel
↓
initramfs/initrd
↓
systemd/init
↓
Services Start
↓
Login Screen / Shell
Important Boot Files
| File/Component | Purpose |
|---|---|
| BIOS/UEFI | Hardware initialization |
| GRUB | Bootloader |
| vmlinuz | Linux kernel |
| initramfs | Temporary boot filesystem |
| systemd | Service manager |
| /boot | Boot files directory |
Common Commands Related to Boot
Check Current Kernel
uname -r
View Boot Logs
journalctl -b
Check Running Services
systemctl list-units --type=service
Check Default Target
systemctl get-default
Common Boot Problems
- Corrupted GRUB
- Missing kernel files
- Filesystem corruption
- Failed services
- Wrong fstab configuration
- Kernel panic
Kernel Panic
A critical kernel error where the system cannot continue booting.
Causes:
- Driver failures
- Hardware problems
- Corrupted kernel
- Memory issues
Top comments (0)