Applies to: Modern Linux systems using systemd, GRUB, and common distribution tooling Last reviewed: 2026-07-14
A practical reference for the Linux boot sequence, kernel command line, initramfs, systemd targets, boot troubleshooting, modules, and recovery.
Warning
Bootloader, kernel, initramfs, filesystem, and module changes can leave a system unbootable. Preserve a known-good kernel, console access, backups, and a tested recovery path before making changes.
- Firmware: BIOS or UEFI initializes hardware and selects a boot entry.
- Bootloader: GRUB or another bootloader loads the kernel and initramfs.
- Kernel: The kernel initializes CPU, memory, drivers, and core subsystems.
- Initramfs: Early userspace discovers storage, unlocks encryption, assembles RAID or LVM, and mounts the real root filesystem.
- PID 1: The kernel starts the init process, commonly systemd.
- Userspace: systemd mounts filesystems, starts services, and reaches the configured target.
uname -a
uname -r
cat /etc/os-release
cat /proc/cmdline
systemd-detect-virt
systemctl get-default
systemctl is-system-runningls -lh /boot
ls -lh /boot/efi
find /boot -maxdepth 1 -type f -printf '%f\n'Common files:
| File | Purpose |
|---|---|
vmlinuz-* |
Compressed Linux kernel image |
initrd.img-* or initramfs-* |
Early userspace image |
config-* |
Kernel build configuration |
System.map-* |
Kernel symbol map |
/boot/grub/grub.cfg |
Generated GRUB configuration |
/etc/default/grub |
Distribution-level GRUB defaults |
/etc/fstab |
Filesystems and mount behavior |
Do not edit generated grub.cfg files directly unless the platform explicitly requires it. Change the source configuration and regenerate the file.
Show current parameters:
cat /proc/cmdlineCommon temporary troubleshooting parameters:
| Parameter | Effect |
|---|---|
systemd.unit=rescue.target |
Boot into rescue mode |
systemd.unit=emergency.target |
Boot into minimal emergency mode |
rd.break |
Break into initramfs on supported distributions |
nomodeset |
Disable normal graphics mode setting for troubleshooting |
single or 1 |
Request a single-user or rescue-like boot on some systems |
init=/bin/bash |
Start a shell as PID 1; use only for controlled recovery |
Caution
Kernel parameters differ by distribution, bootloader, initramfs implementation, and security configuration. Temporary console edits are safer than permanent changes while diagnosing an issue.
systemctl list-units --type=target
systemctl get-default
systemctl set-default multi-user.target
systemctl set-default graphical.target
systemctl isolate rescue.target
systemctl isolate emergency.targetWarning
systemctl isolate stops units that are not required by the target and can disconnect remote sessions. Use console access for rescue operations.
systemd-analyze
systemd-analyze blame
systemd-analyze critical-chain
systemd-analyze plot > boot.svgblame shows activation time, not necessarily the root cause. Use critical-chain and logs to understand ordering and dependency delays.
Current boot:
journalctl -b
journalctl -b -p warning
journalctl -b -u <unit>
dmesg --humanPrevious boot:
journalctl -b -1
journalctl -b -1 -p warningList recorded boots:
journalctl --list-bootsIf previous boots are unavailable, persistent journal storage may not be enabled.
systemctl --failed
systemctl status <unit>
journalctl -b -u <unit>
systemctl show <unit> -p After -p Before -p Requires -p Wants
systemctl list-dependencies <unit>Reset a unit's failed state only after collecting evidence:
systemctl reset-failed <unit>findmnt
findmnt --verify
lsblk -f
blkid
cat /etc/fstab
systemctl --failed --type=mount
journalctl -b | grep -iE 'mount|filesystem|fsck'Test an fstab change without rebooting:
sudo mount -avCaution
mount -a can still affect live mount points. Review the exact fstab change and use maintenance controls for production systems.
For noncritical network or removable mounts, options such as nofail, _netdev, or systemd automount behavior may prevent unnecessary boot failure, but they change availability semantics.
Debian and Ubuntu:
lsinitramfs /boot/initrd.img-$(uname -r) | less
sudo update-initramfs -u -k $(uname -r)RHEL, Fedora, Rocky, and related systems:
lsinitrd /boot/initramfs-$(uname -r).img | less
sudo dracut --force /boot/initramfs-$(uname -r).img $(uname -r)Rebuild an initramfs when required storage, encryption, filesystem, or early-boot drivers are missing.
Warning
Confirm the target kernel version and verify free space in /boot before rebuilding. Do not overwrite the only known-good boot image without a recovery option.
Inspect defaults:
cat /etc/default/grubDebian and Ubuntu:
sudo update-grubCommon RHEL-family BIOS path:
sudo grub2-mkconfig -o /boot/grub2/grub.cfgCommon RHEL-family UEFI path varies by distribution and version. Determine the supported generated configuration path before running grub2-mkconfig.
List firmware boot entries:
sudo efibootmgr -vDebian and Ubuntu:
dpkg -l 'linux-image*' | grep '^ii'
apt list --installed 'linux-image*'RHEL-family systems:
rpm -q kernel
sudo grubby --default-kernel
sudo grubby --info=ALLKeep at least one known-good previous kernel until the new kernel has booted and passed validation.
lsmod
modinfo <module>
sudo modprobe <module>
sudo modprobe -r <module>
journalctl -k -b
dmesg --human | grep -i <module>Persistent module loading commonly uses files under:
/etc/modules-load.d/
Module options commonly use:
/etc/modprobe.d/
Caution
Removing storage, network, filesystem, or security modules can interrupt the running system. Inspect module dependencies with modinfo and test in a nonproduction environment.
sysctl -a
sysctl <key>
sudo sysctl -w <key>=<value>
sudo sysctl --systemPersistent settings are commonly stored under:
/etc/sysctl.conf
/etc/sysctl.d/*.conf
Capture the old value and understand namespace or container interactions before changing kernel parameters.
lscpu
lsmem
lsblk
lspci -k
lsusb
cat /proc/meminfo
cat /proc/interrupts
cat /proc/modules| Symptom | Checks |
|---|---|
| Kernel panic: unable to mount root | Root device parameter, initramfs drivers, storage discovery, filesystem support |
| Emergency mode after mount failure | /etc/fstab, UUIDs, filesystem state, network mount dependencies |
| Boot hangs waiting for a device | Missing disk, incorrect UUID, timeout behavior, encrypted-volume or LVM activation |
| New kernel does not boot | Select previous kernel, compare initramfs and modules, inspect console logs |
| Network unavailable after boot | Driver or firmware, predictable interface names, NetworkManager/systemd-networkd status |
| Service delays boot | systemd-analyze critical-chain, unit dependencies, DNS, network-online target |
| UEFI cannot find bootloader | EFI System Partition, NVRAM entries, Secure Boot, bootloader installation |
- Photograph or capture the console error.
- Try a known-good previous kernel from the bootloader.
- Temporarily remove quiet or splash parameters to reveal messages.
- Boot into rescue or emergency mode.
- Confirm root filesystem,
/boot, and EFI mounts. - Review the current and previous boot journal.
- Validate
fstab, kernel command line, and initramfs contents. - Rebuild only the affected artifact.
- Regenerate the bootloader configuration when required.
- Reboot with console access and validate services, storage, networking, and monitoring.
- UEFI Secure Boot can reject unsigned kernels or modules.
- Kernel lockdown can restrict low-level access when Secure Boot is active.
- SELinux and AppArmor can block userspace actions after the kernel boots.
- LUKS encryption may require console input, TPM integration, or network-bound disk encryption.
- Measured boot and TPM policies can change after firmware, bootloader, or kernel updates.
Do not disable a security control merely to make a system boot without first understanding the failure and the resulting exposure.