Linux Professional Institute LPIC-1 Exam 101

System Architecture

Boot the System

Understanding the Linux boot process is essential for troubleshooting and optimizing system startup. This guide walks through each stage—from firmware to the init system—detailing BIOS/UEFI, the GRUB bootloader, kernel initialization with initramfs, and the init process.

The image is a flowchart illustrating the system boot process, showing the sequence from BIOS or UEFI to Bootloader, Kernel, and Init.

1. BIOS and the Master Boot Record (MBR)

The Basic Input/Output System (BIOS) resides on a motherboard chip and executes immediately after power-on. It performs:

  1. Power-On Self-Test (POST): Verifies basic hardware (CPU, memory, etc.).
  2. Device Initialization: Activates video, keyboard, and storage controllers.
  3. MBR Read: Loads the first 512 bytes—the Master Boot Record—from the configured disk.
  4. Bootstrap Loader: Executes the first-stage bootloader (440 bytes), reads the partition table, then transfers control to the second stage to load the bootloader and kernel.

Note

The MBR format supports disks up to 2 TiB and allows a maximum of four primary partitions. Consider GPT for larger disks.

The image illustrates a comparison between two storage sections: one with 440 bytes for the first device bootstrap and another with 512 bytes for the MBR and DOS partition.

The image is a slide explaining the BIOS POST process, detailing its functions like identifying hardware failures, activating components, loading the bootstrap from the MBR, and loading the bootloader's second stage.

2. UEFI (Unified Extensible Firmware Interface)

UEFI modernizes BIOS by using non-volatile memory (NVRAM) to locate EFI applications on an EFI System Partition (ESP). Key aspects:

  1. UEFI POST: Hardware diagnostics similar to BIOS.
  2. Component Activation: Initializes video, input, and storage.
  3. EFI Application: Loads the bootloader or OS selector from /EFI on the ESP (FAT12/16/32 or ISO 9660).
  4. Kernel Loading: Transfers control to the bootloader, which loads the Linux kernel.

UEFI’s Secure Boot verifies digital signatures, preventing unauthorized kernels and bootloaders.

Warning

Disabling Secure Boot is often required when installing unsigned or custom kernels. Ensure you understand the security implications.

The image is a diagram related to UEFI, showing components like NVRAM, EFI applications, FAT filesystems or ISO-9660, and the EFI System Partition (ESP).

The image is a slide describing the functions of UEFI, including identifying hardware failures, activating components, executing EFI applications, loading the kernel, and supporting Secure Boot.

3. GRUB: The Grand Unified Bootloader

GRUB is the most common x86 bootloader for BIOS and UEFI systems. Press Shift (BIOS) or Esc (UEFI) to access the menu if it doesn’t appear.

The image is an informational graphic about the Grand Unified Bootloader (GRUB), showing key combinations for BIOS (SHIFT) and UEFI (ESC) booting.

From GRUB, you can select kernels and pass parameters in option=value format:

ParameterDescription
acpi=offDisable ACPI support
init=/bin/bashBoot directly to a Bash shell
systemd.unit=multi-user.targetSet the systemd target (e.g., multi-user, graphical)
mem=512MLimit maximum RAM available
maxcpus=2Restrict CPU cores
quietSuppress most boot messages
vga=askPrompt for video mode
root=/dev/sda3Specify root filesystem partition
rootflags=ro or rootflags=rwMount root filesystem read-only or read-write

The image is a list of bootloader commands and their descriptions, including examples for setting system parameters like ACPI, system initialization, RAM, processors, and root filesystem options.

We’ll cover permanent GRUB configuration in a later lesson.

4. Kernel Initialization and initramfs

After GRUB loads the kernel:

  1. Kernel Startup: Initializes CPU, memory management, and drivers.
  2. initramfs Mount: Unpacks the initial RAM filesystem, which includes essential modules and tools.
  3. Real Root Mount: Switches to the actual root partition defined in /etc/fstab.
  4. Exec Init: The kernel runs:
exec /sbin/init

This launches the init system and frees the initramfs from memory.

The image is a slide explaining the Linux boot process, detailing how the kernel is loaded into RAM, mounts filesystems, and loads the init program.

5. Init Systems: SysV, systemd, and Upstart

Linux distributions may use different init managers:

Init SystemTypeKey Features
SysV initRunlevel-basedSequential startup with scripts, runlevels 0–6
systemdService managerParallel startup, socket/D-Bus activation, cgroups, dependency-based units
UpstartEvent-drivenResponds to system events for parallel service startup (legacy Ubuntu releases)

The image is a comparison of three init systems: SysV standard, systemd, and Upstart, describing their functions and usage.

Viewing and Analyzing Boot Messages

The kernel logs boot messages in a ring buffer. To inspect them:

dmesg | less

On systems with systemd, use journalctl:

  • List recorded boots:

    journalctl --list-boots
    
  • View the current boot log (boot 0):

    journalctl -b 0
    

To read logs from a different directory:

journalctl -D /var/log/other_directory

Watch Video

Watch video content

Previous
Determine and Configure Hardware Settings