Operations 8 min read

Understanding Linux Boot Process: From BIOS to Systemd

This article explains the Linux boot sequence, covering the BIOS/UEFI hardware check, GRUB2 bootloader configuration, kernel loading with initramfs, root filesystem mounting, systemd target units, essential services, and a CentOS 8 example with GRUB settings and module inspection.

Open Source Linux
Open Source Linux
Open Source Linux
Understanding Linux Boot Process: From BIOS to Systemd

Linux Boot Process Notes

System Directory Structure

The /boot directory typically contains:

[root@web01 boot]# ls
config-4.18.0-305.3.1.el8.x86_64
efi
grub2
initramfs-0-rescue-4396f3518626409aa9770c4df8d21cb2.img
initramfs-4.18.0-305.3.1.el8.x86_64.img
initramfs-4.18.0-305.3.1.el8.x86_64kdump.img
loader
System.map-4.18.0-305.3.1.el8.x86_64
vmlinuz-0-rescue-4396f3518626409aa9770c4df8d21cb2
vmlinuz-4.18.0-305.3.1.el8.x86_64
initramfs-4.18.0-305.3.1.el8.x86_64.img

: driver image vmlinuz-4.18.0-305.3.1.el8.x86_64: kernel image

Kernel Version and CPU Information

root@web01 boot]# uname -r
4.18.0-305.3.1.el8.x86_64
root@web01 boot]# cat /proc/cpuinfo
flags : fpu vme de pse tsc msr pae mce cx8 apic ... (truncated for brevity)

Network Configuration and Kernel Parameters

# Check if IP forwarding is enabled
cat /proc/sys/net/ipv4/ip_forward
1   # enabled
0   # disabled
# Check if ICMP echo requests are ignored (ping disabled)
cat /proc/sys/net/ipv4/icmp_echo_ignore_all
1   # enabled
0   # disabled
# /etc/sysctl.conf example
vm.dirty_expire_centisecs = 4500
net.ipv4.ip_forward = 0
net.ipv4.icmp_echo_ignore_all = 1
# Apply changes immediately
sysctl -p

Linux System Boot Process

1. BIOS / UEFI Stage

Hardware detection : Power‑on self‑test verifies hardware.

Boot device selection : BIOS/UEFI chooses the device to boot from (disk, USB, network, etc.).

2. Boot Loader (GRUB2)

Loads the /boot directory from the root partition.

Executes GRUB configuration commands such as:

set root='hd0,msdos1'
search --no-floppy --fs-uuid --set=root ...

Loads the Linux kernel and transfers control to it.

3. Kernel Loading and Initialization

Linux kernel start : Initializes hardware, memory, and drivers.

Mounts the initial RAM filesystem ( initramfs) to provide early drivers and tools.

Performs disk, filesystem, LVM, RAID, etc., initialization.

Mounts the real root filesystem according to /etc/fstab.

4. systemd Startup

systemd

becomes the init system after the kernel finishes its own initialization.

Mounts all filesystems.

Starts the default target unit ( graphical.target or multi-user.target).

Launches core services such as network, SSH, firewall, and database services.

5. Target Units

CentOS 8 uses target units to control the boot flow. Common targets include: multi-user.target: Non‑graphical default (runlevel 3). graphical.target: Graphical default, depends on multi-user.target. basic.target: Minimal environment, started before multi-user.target. reboot.target: Reboot. halt.target: Power‑off.

6. Service Startup

systemd

starts services based on dependencies, e.g.: dbus.service: D‑Bus message bus. sshd.service: SSH daemon. firewalld.service: Firewall manager. NetworkManager.service: Network management. gnome-shell.service or lightdm.service: Graphical session.

7. User Login

Login manager (GDM, LightDM, etc.) presents the login screen for graphical sessions.

After authentication, the user session is started.

8. System Ready

When all services start without errors, the system reaches a stable operational state and is ready for use.

CentOS 8 Boot Example

GRUB Configuration File

/etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR='$(sed 's, release .*$,,g' /etc/system-release)'
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT='console'
GRUB_CMDLINE_LINUX='crashkernel=auto resume=/dev/mapper/cl-swap rd.lvm.lv=cl/root rd.lvm.lv=cl/swap rhgb quiet'
GRUB_DISABLE_RECOVERY='true'
GRUB_ENABLE_BLSCFG=true

Update GRUB configuration:

# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
done

Install or repair the GRUB bootloader:

# grub2-install /dev/sda

Loading Kernel and Drivers

Load kernel image – the kernel begins initialization.

List loaded modules: # lsmod Show detailed information for a module (e.g., kvm):

# modinfo kvm
operationsKernelBoot ProcessCentOSsystemdgrub
Open Source Linux
Written by

Open Source Linux

Focused on sharing Linux/Unix content, covering fundamentals, system development, network programming, automation/operations, cloud computing, and related professional knowledge.

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.