Boot Process and Systemd — this is what happens between the moment you press the power button on your computer and the moment you see a login prompt. For the LPIC-1 exam, you must understand this sequence precisely because you will be asked to manage services, debug boot failures, and identify the role of each component.
Jump to a section
A simple way to picture Boot Process and Systemd
The Head Chef is the central figure in this scene, responsible for ensuring the restaurant opens successfully every morning.
First, the Head Chef arrives and performs a hardware check: the ovens preheat, the fridges are on, and the fryers have oil. This is like the BIOS or UEFI checking that all physical components of a computer are working. Once the Head Chef confirms the kitchen itself is functional, they turn on the main power switch to the whole system, which is like the boot loader (GRUB) starting up and finding the operating system kernel.
The operating system kernel is the Head Chef themselves, who now takes full control. The Head Chef’s first job is to start the most essential assistant—the init process, which in a modern Linux restaurant is systemd. Systemd is like the sous chef who knows every single prep task and recipe for the day. The sous chef does not guess—they consult a precise binder of instructions called unit files, which list every service to run, like turning on the coffee machine, lighting the grill, or setting up the point-of-sale system.
The sous chef systemd fires up these services in the correct order, waits for each one to fully start before proceeding, and keeps an eye on them all day long. If a service crashes, like the coffee machine dies, the sous chef immediately restarts it without waiting for a new day. This whole controlled, reliable opening process replaces the old way where a head chef would run a messy script that started everything at once with no oversight.
The Linux boot process is a sequence of events that starts with the hardware powering on and ends with the operating system ready for use. Understanding this sequence is critical for LPIC-1 because you will need to troubleshoot problems that occur at each stage.
The first step is the Power-On Self-Test (POST). When you press the power button, the computer’s firmware—either Basic Input/Output System (BIOS) or Unified Extensible Firmware Interface (UEFI)—runs a quick check on hardware components like RAM, the CPU, and storage devices. If everything passes, the firmware looks for a boot device, typically a hard drive or SSD, to load the next stage.
The firmware then loads the boot loader from the Master Boot Record (MBR) or GUID Partition Table (GPT) on the storage device. The most common Linux boot loader is GRUB (Grand Unified Bootloader). GRUB presents a menu of operating systems or kernel versions to boot. If you do not select anything, GRUB loads the default option after a timeout. GRUB knows where the kernel is located on the disk and loads the kernel image into memory, along with the initial RAM disk (initrd or initramfs).
The kernel is the core of the operating system. It manages hardware, memory, and processes. Once the kernel is loaded, it decompresses itself and begins initialising essential subsystems. At this point, the kernel hands over control to the first userspace process, which is the init system.
On modern Linux distributions, the init system is systemd. Systemd is responsible for starting all other processes in the correct order, based on dependencies. It uses unit files to define services, sockets, and other resources. The first unit systemd starts is typically 'systemd-sysinit.service', which handles basic system setup like mounting filesystems and setting the hostname. Then systemd activates 'basic.target' and 'multi-user.target', which sequentially start all the services needed for a fully operational system.
Systemd is not the only init system that ever existed. Older Linux distributions used SysV init, which was a collection of shell scripts that ran in a numbered sequence. SysV init was simple but slow because scripts ran one after the other with no parallel execution or dependency checking. Systemd introduced parallelism, on-demand service activation, and centralised logging via journald. It also introduced the concept of targets, which are groups of units that represent system states. For example, 'graphical.target' includes everything in 'multi-user.target' plus the display manager.
To manage services with systemd, the main command is 'systemctl'. With 'systemctl', you can start, stop, restart, enable, disable, and check the status of services. For example, 'systemctl start sshd' starts the SSH daemon. 'systemctl enable sshd' configures it to start automatically on boot. 'systemctl status sshd' shows whether the service is running, its process ID, and recent log entries. Understanding these commands is essential for LPIC-1 because exam questions will present scenarios where you must determine the correct command to control a service.
Systemd also includes tools like 'journalctl' for viewing logs, 'systemd-analyze' for profiling boot performance, and 'systemctl list-units' for listing all active units. The boot process now includes systemd's own sequence of targets: 'default.target' is the target that the system boots into, usually linked to 'graphical.target' or 'multi-user.target'. The boot sequence can be customised by changing this target or by masking or disabling services.
It is important to know that the boot process can fail at various points. Common failures include a damaged boot loader, a missing kernel, a corrupted initramfs, or a systemd unit that fails to start. You can troubleshoot these issues by booting into single-user mode or rescue mode, editing GRUB parameters at boot time, or using a live CD to repair the system. The LPIC-1 exam expects you to understand the order of the boot process and the role of each component so that you can diagnose and fix problems.
Firmware (BIOS/UEFI) Initialisation
When you press the power button, the firmware runs POST (Power-On Self-Test) to check hardware. It then locates a bootable device (e.g., hard drive, USB) by looking at the boot order. This step is the first contact between software and hardware.
Boot Loader (GRUB) Loads the Kernel
The firmware loads GRUB from the Master Boot Record (MBR) or EFI System Partition (ESP). GRUB presents a menu of operating systems. After you select an option (or after a timeout), GRUB loads the Linux kernel and initramfs into memory, then hands control to the kernel.
Kernel Initialisation
The kernel decompresses itself and initialises core subsystems: memory management, process scheduling, and basic hardware drivers. It then mounts the initramfs as a temporary root filesystem and runs the init program within it.
Initramfs and Root Filesystem Mounting
The initramfs contains minimal tools and drivers. It loads the driver needed to access the real root filesystem (e.g., an encrypted partition or a RAID array). Once the real root is mounted, it switches to that root filesystem and then starts the actual init system (systemd).
Systemd Initialisation and Target Execution
Systemd (PID 1) reads its configuration and unit files. It starts the default target (e.g., multi-user.target or graphical.target) by resolving dependencies. This triggers the start of all required services, such as networking, display managers, and cron daemons, in parallel. The system reaches a login prompt or graphical interface.
An IT professional at a small company manages a Linux web server that hosts the company’s public website. One morning, users report that the site is unreachable. The IT pro opens a terminal and uses SSH to connect to the server, but the connection fails. They then use a remote console provided by the hosting provider to gain direct access to the machine.
The server has booted but the login prompt is not appearing. The IT pro suspects a boot failure. They reboot the server and watch the console output. The boot process stops at a message saying 'A start job is running for Network Manager' and then a timeout occurs. The systemd service for networking is hanging.
The IT pro needs to fix this. They cannot run normal commands because the system is in a degraded state. They reboot again and during the GRUB menu, they press 'e' to edit the boot parameters. They add 'systemd.unit=rescue.target' to the kernel command line. This tells systemd to boot into a minimal environment without network services. The system boots successfully into rescue mode.
Now the IT pro can use systemctl commands to diagnose the problem:
They run 'systemctl status NetworkManager.service' to see that the service has failed to start.
They check the journald logs with 'journalctl -u NetworkManager.service' and see a configuration error in the network interface file.
They edit the configuration file to correct the error.
They then run 'systemctl start NetworkManager.service' to test it.
The service starts successfully, and they run 'systemctl enable NetworkManager.service' to ensure it will start on future boots.
Finally, they reboot normally and the server comes up fully, with the website accessible.
In another scenario, the IT pro is deploying a new application server. They need to ensure that a custom service called 'webapp' starts automatically after the database service. They create a systemd unit file called 'webapp.service' with a line 'After=postgresql.service' and 'Requires=postgresql.service'. Then they run:
'systemctl daemon-reload' to reload systemd configuration
'systemctl enable webapp.service' to enable it at boot
'systemctl start webapp.service' to start it immediately
The IT pro then monitors the service using 'systemctl status webapp.service' and 'journalctl -fu webapp.service' to follow logs in real time. This is a routine part of managing modern Linux servers.
The LPIC-1 exam tests your understanding of the boot process and systemd in several specific ways. You must memorise the order of boot stages: POST, firmware, boot loader, kernel, initramfs, systemd init, and then targets. Exam questions will ask you to identify which component performs which function. For example, 'Which component loads the kernel into memory?' Answer: the boot loader (GRUB).
Trap: The exam expects you to know the difference between SysV init and systemd. For example, they might ask which command replaces 'service sshd start' and 'chkconfig sshd on'. The correct answer is 'systemctl start sshd' and 'systemctl enable sshd'. A common trap is offering 'systemctl restart sshd' as an answer for starting a service that is not already running.
Key topics you must know for the exam:
The role of the initramfs: it contains drivers and tools needed to mount the root filesystem.
The purpose of 'systemd-analyze': it gives boot time statistics.
How to change the default boot target: use 'systemctl set-default multi-user.target' or 'graphical.target'.
The difference between 'target' and 'service': a target groups multiple units, a service starts a single daemon.
The use of 'systemctl mask' and 'systemctl disable': mask prevents any manual or automatic start, disable only prevents automatic start.
The command 'journalctl -b' shows logs from the current boot.
The sequence of systemd targets: 'local-fs.target', 'sysinit.target', 'basic.target', 'multi-user.target', 'graphical.target'.
They also test your ability to interpret error messages. A question might describe a system that boots to a 'Welcome to emergency mode' prompt. The correct course of action is to check '/etc/fstab' for missing filesystem entries and then run 'systemctl daemon-reload'.
Another common question type: 'Which file does systemd use to store the default target?' Answer: '/etc/systemd/system/default.target'. But be aware that this is usually a symbolic link to another target file.
Memorise these exact commands: 'systemctl list-units --type=service --state=running', 'systemctl list-unit-files', 'systemctl is-enabled sshd', 'systemctl is-active sshd'. The exam loves to ask 'which command checks if a service is enabled to start at boot'? The answer is 'systemctl is-enabled'.
Finally, know that systemd can manage timers as a replacement for cron, but that is a secondary topic. The primary focus is managing services and understanding the boot sequence.
The Linux boot process follows a fixed order: firmware (BIOS/UEFI), boot loader (GRUB), kernel, initramfs, systemd init, then targets and services.
Systemd is both the init system and a service manager; it uses unit files to define how to start and manage services.
The 'systemctl' command is the primary tool to start, stop, enable, disable, and check the status of services.
Use 'systemctl enable servicename' to make a service start automatically at boot; use 'systemctl start servicename' to start it immediately.
The command 'journalctl -u servicename.service' shows logs specific to that service, which is essential for troubleshooting.
Boot into a different target by adding 'systemd.unit=rescue.target' to the GRUB kernel command line at boot time.
The default target is managed by 'systemctl set-default name.target', and the file '/etc/systemd/system/default.target' is a symlink to the chosen target.
Systemd introduces parallelism and dependency-based service ordering, which replaces the sequential, script-based SysV init.
These come up on the exam all the time. Here's how to tell them apart.
BIOS
Uses Master Boot Record (MBR) for booting
Limited to 2.2 TB disk support
No secure boot feature
Older, slower interface
UEFI
Uses GUID Partition Table (GPT)
Supports disks larger than 2.2 TB
Includes Secure Boot for verifying boot loaders
Newer, graphical interface, faster initialisation
SysV Init
Shell scripts run sequentially in numbered order
No dependency resolution between services
Slower boot due to lack of parallelism
No centralised service management (uses separate chkconfig)
Systemd
Binary and unit files, runs in parallel
Resolves dependencies automatically via unit files
Faster boot through parallel execution
All service management via 'systemctl' and 'journalctl'
systemctl start
Starts a service immediately
Does not change boot-time behaviour
Requires the service to already be installed
systemctl enable
Creates symlinks to start service at boot
Does not start the service immediately
Service remains stopped until next boot or manual start
multi-user.target
Boots to a text-based login (CLI)
No display manager started
Common on servers for efficiency
graphical.target
Boots to a graphical desktop environment
Includes a display manager (e.g., GDM, LightDM)
Common on desktop and laptop Linux systems
Mistake
The initramfs is optional and only used during installation
Correct
The initramfs is a critical component loaded with the kernel on every boot. It contains drivers and tools necessary to mount the real root filesystem, especially if that filesystem is on an encrypted partition or uses a specialised filesystem.
This mistake happens because after installation, you never see the initramfs directly. Users think it is a one-time tool, not a permanent part of the boot chain.
Mistake
Systemd just restarts services that crash automatically
Correct
Systemd can be configured to restart services automatically, but it does not do so by default for every service. The 'Restart=' directive in a unit file must be explicitly set. Before systemd, admins used tools like monit or daemontools for automatic restarting.
Because systemd is known for its reliability features, beginners assume all services get auto-restarted, but systemd is still a policy engine, not a magic fixer.
Mistake
If you use 'systemctl disable sshd', the SSH service stops immediately
Correct
The 'disable' command only prevents the service from starting automatically at boot. It does not stop a currently running service. To stop it immediately, you need 'systemctl stop sshd'. This distinction is often tested on the LPIC-1 exam.
People conflate 'disable' with 'stop' because the words sound similar and both remove the service from use. The temporal difference is subtle but important.
Mistake
The boot process is the same on all Linux distributions
Correct
While the general stages are similar, distributions differ in which init system they use (systemd vs. older SysV), which boot loader they default to (GRUB vs. LILO vs. EFISTUB), and how they configure the initramfs. Some use dracut, others use mkinitcpio. The LPIC-1 exam tests the most common conventions.
Beginners often think Linux has one standard way of doing things, but distributions have historically made different choices, leading to variations.
Mistake
You cannot use 'systemctl' to manage services that were started by the old SysV init
Correct
Systemd provides compatibility with SysV init scripts. If a service has an init script but no systemd unit file, systemd can still manage it via the 'systemd-sysv-generator' which creates a wrapper unit. This backwards compatibility is a feature you should know for the exam.
Because systemd is so different from SysV init, users assume there is no interoperability, but systemd was designed to ease migration.
Mistake
The BIOS and UEFI are the same thing
Correct
UEFI (Unified Extensible Firmware Interface) is a modern replacement for BIOS. UEFI supports larger disks (GPT), a graphical interface, and secure boot, whereas BIOS is older and uses MBR. Linux can boot on both, but the boot process differs slightly, especially in how the boot loader is located.
The terms are often used interchangeably in casual conversation, and many beginners do not encounter UEFI-specific features until they study for certification.
Reveal each answer, then mark whether you got it right. Score 60%+ to unlock the next chapter.
'Enable' configures a service to start automatically at boot time. 'Start' launches the service immediately, regardless of whether it is enabled. You use 'start' to run it now and 'enable' to make it survive a reboot.
Use 'systemctl disable servicename'. This removes the symlinks that make the service start at boot, but leaves the service installed and can still be started manually later.
The initramfs (initial RAM filesystem) is a small, temporary root filesystem loaded with the kernel. It contains device drivers and tools needed to mount the real root filesystem, especially if it uses encryption, LVM, or a filesystem not natively supported by the kernel.
Use 'journalctl -u servicename.service'. For example, 'journalctl -u sshd.service' shows all log entries related to the SSH daemon. Add '-f' to follow new log entries in real time.
Emergency mode means systemd could not start essential services or mount filesystems listed in /etc/fstab. You are given a minimal root shell to fix the issue, such as editing /etc/fstab or repairing a broken filesystem.
Yes. Use 'systemctl set-default multi-user.target' (for a text-only login) or 'systemctl set-default graphical.target' (for a desktop GUI). This changes the target that systemd starts on next boot.
'systemctl list-units' shows currently loaded units and their status (active, inactive). 'systemctl list-unit-files' shows all installed unit files and whether they are enabled, disabled, or static, regardless of whether they are running now.
You've finished Boot Process and Systemd. Continue through the LPIC-1 study guide to build a complete picture of the exam.
Done with this chapter?