2.1 Linux Boot Sequence, GRUB2, Kernel Parameters & Initrd
Key Takeaways
UEFI firmware can start an operating system from an EFI executable on the EFI System Partition. Use the running system’s mount table to identify the partition’s mount point.
PXE lets supported firmware load a boot program over the network. In a common setup DHCP supplies boot information and TFTP serves the first file.
A temporary GRUB edit changes one boot. Use the distribution’s bootloader tools for persistent changes and read
/proc/cmdlinefor the current boot’s effective arguments.An initramfs can supply the drivers and userspace tools needed to mount the real root before the host’s normal system manager starts.
2.1 Linux Boot Sequence, GRUB2, Kernel Parameters & Initrd
When Linux will not boot, identify the last successful stage. Firmware, a bootloader, the kernel and its early userspace, and the system manager each handle different parts of startup. Error messages become more useful when you know which component produced them.
Firmware and boot selection
Legacy BIOS initializes the machine and can run bootstrap code from the boot disk’s Master Boot Record (MBR). GRUB may need additional code outside the MBR to reach its configuration and kernel images. On a BIOS system with a GUID Partition Table (GPT), that extra code can live in a BIOS Boot Partition. The exact layout depends on how GRUB was installed.
On a typical Unified Extensible Firmware Interface (UEFI) Linux installation, firmware loads an EFI executable from an EFI System Partition (ESP). On the running OS, the ESP might be mounted at /boot/efi, /boot, or another path. Inspect the host’s actual mounts before using a file path in a repair. The UEFI boot order can refer to entries in nonvolatile memory. When booted in UEFI mode with the necessary access, efibootmgr -v displays the configured entries and paths. Secure Boot adds signature checks to the boot chain.
Network boot with PXE
The Preboot Execution Environment (PXE) lets supported firmware start an installer or other boot program over the network. In a common setup, Dynamic Host Configuration Protocol (DHCP) supplies network configuration and information used to locate the boot program. Trivial File Transfer Protocol (TFTP) serves the initial file. Later installer components may come from another protocol or server. The boot program must suit the client’s firmware mode and CPU architecture.
For example, a UEFI client receives an address but reports that it cannot find a boot file. A DHCP lease confirms IP configuration, so inspect the advertised boot filename and whether the correct EFI executable is available on the boot server. If the loader starts but cannot find its configuration, treat that message as a later-stage failure.
GRUB and the kernel command line
The bootloader selects a boot entry, loads the kernel and usually an initramfs, and passes arguments to the kernel. Common inputs for a generated GRUB menu include /etc/default/grub and scripts under /etc/grub.d/. Use the distribution’s tools rather than hand-editing the generated menu. Debian’s update-grub regenerates its menu. On RHEL 9 systems using the documented Boot Loader Specification setup, grubby can update kernel entries. For example, grubby --update-kernel=ALL --args=loglevel=4 updates the arguments for installed entries. Inspect entries with grubby --info=ALL; consult the instructions for the exact release before assuming how updates affect future kernels.
At a GRUB menu that permits editing, press e to edit an entry for one boot. A temporary edit helps test a known argument without committing a persistent change. The running kernel exposes its effective arguments in /proc/cmdline. Common arguments and their owners include:
| Argument | Role |
|---|---|
root=UUID=… | Identifies the real root device for startup. Early userspace may need to assemble the storage first. |
rd.break | Requests a shell during dracut-built early userspace. |
systemd.unit=emergency.target | Selects the emergency target for the main systemd instance when applicable. |
Kernel, initramfs and the system manager
The kernel decompresses and initializes core subsystems. The initramfs is a cpio archive unpacked into an in-memory root filesystem, where its /init can start early userspace. An older initrd uses an initial RAM disk image. Administrators and documentation sometimes use “initrd” for the boot image in either arrangement. Early userspace can load a storage driver, assemble LVM, unlock storage and mount the real root. The handoff starts the host’s normal system manager, commonly systemd in process ID 1.
A kernel that loads but then reports a missing root volume points to the root identifier, storage or early userspace. Inspect the boot entry and compare its root= argument to the expected device. If the failure started after a kernel update, a known-good boot entry can help separate a missing early driver in the new image from a general disk failure. On a dracut system, lsinitrd inspects an image. Confirm the target kernel version before regenerating it with the distribution’s image tool.
After the handoff, systemd follows unit dependencies toward the default target and mounts filesystems specified by system configuration. systemctl get-default reports the configured default target. If the kernel reached the main system and a service failed, inspect its unit status and the journal for that boot. Use the failed component to guide the next step.
A PXE client gets a DHCP address but reports that its initial boot file cannot be found. What should you inspect first?
The guest’s systemd target
The advertised boot filename and the file on the boot server
The distribution’s repository signing key
The local system’s group database
The kernel loaded but early userspace cannot locate a root volume that requires a storage driver. Which component should you inspect for the driver?
The shell history file
The external DNS zone
The initramfs associated with the chosen kernel
The systemd default target
Sections you finish are checked off in the contents.