Skip to content

1.3 Partitioning and Boot Process

Linux organizes files in a tree structure, not drive letters (C:, D:). Everything starts at / (root).

PathPurpose
/Root. The top of the hierarchy.
/bootKernel (vmlinuz), initramfs, and bootloader config.
/etcConfiguration files.
/homeUser data (e.g., /home/alice).
/rootHome directory for the root user.
/varVariable data: logs, databases, websites (/var/www).
/tmpTemporary files (often cleared on reboot).
/bin, /usr/binBinaries (programs) like ls, cp.
  • Legacy.
  • Max 4 primary partitions.
  • Max 2TB disk size.
  • Modern standard (part of UEFI spec).
  • Practically unlimited partitions.
  • Supports massive disks (Zettabytes).

Recommended Partition Layout:

How do we get from power button to login prompt?

graph TD
    A[BIOS / UEFI] -->|POST & Hardware Init| B[Bootloader (GRUB2)]
    B -->|Selects OS| C[Kernel]
    C -->|Mounts Initramfs| D[Initramfs (Temporary Root)]
    D -->|Loads Drivers| E[Real Root Filesystem Mounted]
    E -->|Starts Init Process| F[systemd (PID 1)]
    F -->|Parallel Execution| G[Targets & Services]
    G --> H[Login Prompt]
  1. BIOS/UEFI: Firmware initializes hardware and looks for the boot device.
  2. GRUB2 (Grand Unified Bootloader): Detailed menu to select the Kernel. Loads the Kernel into memory.
  3. Kernel: The core OS. It initializes hardware drivers.
  4. Initramfs: A small temporary filesystem loaded into RAM. It helps the kernel fix mounting the real hard drive (e.g., loading decryption keys or specialized drivers).
  5. Init (Systemd): The first process (PID 1). It reads configuration files and starts all other services (Network, SSH, Web Server) in parallel.
Related Concepts: Disks and Partitions Learn more about handling disks in Module 4.