A minimal and sleek daily developer productivity tracker.
The Linux boot process is a series of steps that transforms a powered-off computer into a fully functional Linux system ready for user interaction.
Power On → BIOS/UEFI → Boot Loader → Kernel → Init System → User Space
↓ ↓ ↓ ↓ ↓ ↓
POST Hardware GRUB/LILO vmlinuz systemd Desktop/Login
Detection /etc/
┌─────────────────────────────────────┐
│ POWER ON │
├─────────────────────────────────────┤
│ POST Phase │
│ ┌─────────────────────────────┐ │
│ │ • CPU Check │ │
│ │ • RAM Test │ │
│ │ │ • Memory Size Detection │ │
│ │ │ • Memory Error Check │ │
│ │ • Hardware Detection │ │
│ │ │ • Storage Devices │ │
│ │ │ • Network Cards │ │
│ │ │ • Graphics Cards │ │
│ │ • Peripheral Check │ │
│ └─────────────────────────────┘ │
└─────────────────────────────────────┘
What Happens:
┌─────────────────────────────────────┐
│ BIOS Mode │
├─────────────────────────────────────┤
│ Boot Device Priority: │
│ 1. Hard Drive (MBR) │
│ 2. CD/DVD Drive │
│ 3. USB Drive │
│ 4. Network Boot (PXE) │
├─────────────────────────────────────┤
│ MBR Structure │
│ ┌─────┬─────────┬─────────────┐ │
│ │Boot │Partition│ Boot │ │
│ │Code │ Table │ Signature │ │
│ │446B │ 64B │ 2B │ │
│ └─────┴─────────┴─────────────┘ │
│ ↓ │
│ Loads Bootloader │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ UEFI Mode │
├─────────────────────────────────────┤
│ EFI System Partition (ESP) │
│ ┌─────────────────────────────┐ │
│ │ /boot/efi/ │ │
│ │ ├── EFI/ │ │
│ │ │ ├── BOOT/ │ │
│ │ │ │ └── bootx64.efi │ │
│ │ │ └── ubuntu/ │ │
│ │ │ └── grubx64.efi │ │
│ │ └── System Volume Info │ │
│ └─────────────────────────────┘ │
├─────────────────────────────────────┤
│ Benefits over BIOS │
│ • Faster boot times │
│ • Support for drives > 2TB │
│ • Secure Boot capability │
│ • Better hardware support │
│ • Graphical interface │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ GRUB Menu │
├─────────────────────────────────────┤
│ Ubuntu 22.04 LTS │
│ Advanced options for Ubuntu │
│ Memory test (memtest86+) │
│ Memory test (memtest86+, serial) │
├─────────────────────────────────────┤
│ GRUB Stages │
│ │
│ Stage 1: (MBR/GPT) │
│ ┌─────────────────────────────┐ │
│ │ • Located in MBR │ │
│ │ • 446 bytes of code │ │
│ │ • Loads Stage 1.5 │ │
│ └─────────────────────────────┘ │
│ │
│ Stage 1.5: (Boot Sector) │
│ ┌─────────────────────────────┐ │
│ │ • File system drivers │ │
│ │ • Loads Stage 2 │ │
│ └─────────────────────────────┘ │
│ │
│ Stage 2: (/boot/grub/) │
│ ┌─────────────────────────────┐ │
│ │ • Full GRUB functionality │ │
│ │ • Kernel selection │ │
│ │ • Configuration files │ │
│ └─────────────────────────────┘ │
└─────────────────────────────────────┘
GRUB Configuration:
/boot/grub/grub.cfg
/etc/default/grub
┌─────────────────────────────────────┐
│ Kernel Loading │
├─────────────────────────────────────┤
│ 1. Load vmlinuz │
│ ┌─────────────────────────┐ │
│ │ Compressed Kernel │ │
│ │ /boot/vmlinuz-x.x.x │ │
│ └─────────────────────────┘ │
│ ↓ │
│ 2. Load initrd/initramfs │
│ ┌─────────────────────────┐ │
│ │ Initial RAM Disk │ │
│ │ /boot/initrd.img │ │
│ │ • Essential drivers │ │
│ │ • File system modules │ │
│ └─────────────────────────┘ │
│ ↓ │
│ 3. Kernel Decompression │
│ ┌─────────────────────────┐ │
│ │ Self-extracting │ │
│ │ Kernel archive │ │
│ └─────────────────────────┘ │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Kernel Initialization │
├─────────────────────────────────────┤
│ Phase 1: Hardware Setup │
│ ┌─────────────────────────────┐ │
│ │ • CPU initialization │ │
│ │ • Memory management setup │ │
│ │ • Interrupt handling │ │
│ │ • Timer initialization │ │
│ └─────────────────────────────┘ │
│ ↓ │
│ Phase 2: Core Subsystems │
│ ┌─────────────────────────────┐ │
│ │ • Process management │ │
│ │ • Virtual memory system │ │
│ │ • File system support │ │
│ │ • Device driver loading │ │
│ └─────────────────────────────┘ │
│ ↓ │
│ Phase 3: Root File System │
│ ┌─────────────────────────────┐ │
│ │ • Mount root partition │ │
│ │ • Switch from initramfs │ │
│ │ • Load remaining modules │ │
│ └─────────────────────────────┘ │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ systemd Boot │
├─────────────────────────────────────┤
│ PID 1: systemd │
│ ┌─────────────────────────────┐ │
│ │ • First user space process │ │
│ │ • Parent of all processes │ │
│ │ • Manages system services │ │
│ └─────────────────────────────┘ │
│ ↓ │
│ Boot Targets (Runlevels) │
│ ┌─────────────────────────────┐ │
│ │ • rescue.target (1) │ │
│ │ • multi-user.target (3) │ │
│ │ • graphical.target (5) │ │
│ └─────────────────────────────┘ │
│ ↓ │
│ Service Dependencies │
│ ┌─────────────────────────────┐ │
│ │ basic.target │ │
│ │ ↓ │ │
│ │ sysinit.target │ │
│ │ ↓ │ │
│ │ local-fs.target │ │
│ │ ↓ │ │
│ │ network.target │ │
│ └─────────────────────────────┘ │
└─────────────────────────────────────┘
Unit Types:
┌─────────────────────────────────────┐
│ • .service - System services │
│ • .target - Group of units │
│ • .mount - Mount points │
│ • .device - Hardware devices │
│ • .socket - Network sockets │
│ • .timer - Scheduled tasks │
│ • .path - File/directory │
│ • .slice - Resource management │
└─────────────────────────────────────┘
Service States:
┌─────────────────────────────────────┐
│ • inactive - Not running │
│ • active - Running │
│ • failed - Exited with error │
│ • activating - Starting up │
│ • deactivating - Shutting down │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Service Startup Order │
├─────────────────────────────────────┤
│ 1. Kernel Modules │
│ • Hardware drivers │
│ • File system modules │
│ │
│ 2. File Systems │
│ • Mount /proc, /sys, /dev │
│ • Mount user partitions │
│ │
│ 3. System Services │
│ • systemd-logind │
│ • NetworkManager │
│ • chronyd/ntpd │
│ • rsyslog │
│ │
│ 4. User Services │
│ • SSH daemon │
│ • Web servers │
│ • Database services │
│ │
│ 5. Desktop Environment │
│ • Display manager (gdm/sddm) │
│ • Window manager │
│ • Desktop services │
└─────────────────────────────────────┘
Time Stage Details
0s Power On POST begins
2s BIOS/UEFI Hardware detection
3s Boot Loader GRUB menu (if timeout)
5s Kernel Load vmlinuz decompression
7s Kernel Init Hardware initialization
10s initramfs Essential drivers load
12s Root Mount Switch to real root FS
15s systemd Init system starts
18s Services System services start
25s Login Ready Desktop/TTY available
┌─────────────────────────────────────┐
│ Boot Problems │
├─────────────────────────────────────┤
│ 1. Hardware Issues │
│ • RAM failure │
│ • Hard drive failure │
│ • Power supply problems │
│ │
│ 2. GRUB Issues │
│ • Corrupted boot loader │
│ • Missing kernel │
│ • Wrong root partition │
│ │
│ 3. Kernel Issues │
│ • Kernel panic │
│ • Missing drivers │
│ • Corrupted initramfs │
│ │
│ 4. File System Issues │
│ • Corrupted root FS │
│ • Wrong fstab entries │
│ • Disk full │
│ │
│ 5. Service Issues │
│ • Failed services │
│ • Dependency conflicts │
│ • Configuration errors │
└─────────────────────────────────────┘
┌─────────────────────────────────────┐
│ Recovery Methods │
├─────────────────────────────────────┤
│ 1. GRUB Rescue │
│ • Boot from GRUB command line │
│ • Manually specify kernel │
│ │
│ 2. Single User Mode │
│ • systemctl rescue │
│ • Minimal system boot │
│ │
│ 3. Live USB/CD │
│ • Boot from external media │
│ • chroot into installed system │
│ │
│ 4. Recovery Kernel │
│ • Previous kernel version │
│ • Safe mode boot │
└─────────────────────────────────────┘
/boot/grub/grub.cfg
: GRUB configuration/etc/default/grub
: GRUB defaults/etc/fstab
: File system mount table/etc/systemd/system/
: systemd unit files/proc/cmdline
: Kernel boot parameters/var/log/boot.log
: Boot messages/var/log/dmesg
: Kernel messagesCommon kernel boot parameters:
root=
: Root file system devicero/rw
: Mount root read-only/read-writeinit=
: Alternative init systemsingle
: Single user moderescue
: Rescue modequiet
: Suppress boot messagessplash
: Show splash screen