Fundamentals 8 min read

Understanding Linux Boot: From BIOS POST to Systemd Targets

This guide explains the four main stages of a typical Linux boot sequence—BIOS POST, GRUB2 loading, kernel initialization, and systemd startup—detailing the hardware checks, bootloader behavior, init process, target units, and useful commands for inspecting and changing runlevels.

Liangxu Linux
Liangxu Linux
Liangxu Linux
Understanding Linux Boot: From BIOS POST to Systemd Targets

Overview

When a Linux PC powers on, it passes through four distinct phases before presenting the login prompt: BIOS integrity check (POST), the GRUB2 bootloader, kernel initialization, and the systemd init system.

1. BIOS Integrity Check (POST)

The BIOS runs a Power‑On Self Test (POST) to verify critical hardware such as HDD/SSD, keyboard, RAM, USB ports, and other components. Errors or missing devices may trigger beep codes or on‑screen messages requiring user intervention. If all checks pass, the boot process proceeds.

2. Bootloader (GRUB2)

After POST, the BIOS locates the Master Boot Record (MBR) on the primary disk (e.g., /dev/sda) and loads the GRUB2 bootloader into RAM. GRUB2 presents a menu that lets users select a kernel version or edit kernel parameters. The configuration file is typically /boot/grub2/grub2.cfg. Modern Linux distributions use GRUB2, while older bootloaders like LILO are now obsolete.

3. Kernel Initialization

The selected Linux kernel is decompressed and begins execution. The first user‑space process, init (PID 1), mounts the root filesystem as defined in /etc/fstab and loads the initial RAM disk ( initrd) as a temporary root until the real root filesystem is mounted. This stage also starts essential daemons.

4. Systemd Startup

Systemd replaces the legacy SysV init system and becomes the parent of all processes. It reads /etc/systemd/system/default.target to determine the default target (runlevel). Common targets include: poweroff.target (runlevel 0): shut down the system. rescue.target (runlevel 1): start a rescue shell. multi-user.target (runlevels 2‑4): non‑graphical multi‑user mode. graphics.target (runlevel 5): graphical desktop. reboot.target (runlevel 6): reboot.

On a desktop the default target is usually graphics.target (runlevel 5); on a server it is multi-user.target (runlevel 3).

Useful commands: systemctl get-default To change the target or runlevel, use: init <runlevel-value> For example, init 3 switches to non‑graphical mode, while init 6 reboots the system. Remember to run these commands with sudo when required.

Original Source

Signed-in readers can open the original source through BestHub's protected redirect.

Sign in to view source
Republication Notice

This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactadmin@besthub.devand we will review it promptly.

LinuxBIOSBoot Processinitgrub2
Liangxu Linux
Written by

Liangxu Linux

Liangxu, a self‑taught IT professional now working as a Linux development engineer at a Fortune 500 multinational, shares extensive Linux knowledge—fundamentals, applications, tools, plus Git, databases, Raspberry Pi, etc. (Reply “Linux” to receive essential resources.)

0 followers
Reader feedback

How this landed with the community

Sign in to like

Rate this article

Was this worth your time?

Sign in to rate
Discussion

0 Comments

Thoughtful readers leave field notes, pushback, and hard-won operational detail here.