Skip to content

Boot Issues

A system that fails to boot is one of the most stressful types of failure. This article covers troubleshooting and repair methods for common boot issues including GRUB boot repair, rescue mode usage, fstab error diagnosis, and dracut problems.

The boot flow of an EL system:

  1. Firmware (BIOS/UEFI) — Hardware self-test, loads the bootloader
  2. GRUB2 — Reads configuration, loads kernel and initramfs
  3. Kernel — Initializes hardware, mounts initramfs
  4. dracut/initramfs — Loads drivers, mounts the root filesystem
  5. systemd — Starts targets and services

Failures at different stages have different symptoms and solutions.

When GRUB cannot find its configuration file or modules, it drops to the grub rescue> prompt.

The screen displays:

error: no such partition.
Entering rescue mode...
grub rescue>
List available disks and partitions
grub rescue> ls

This displays output like (hd0) (hd0,msdos1) (hd0,msdos2).

Search each partition for the grub directory
grub rescue> ls (hd0,msdos1)/boot/grub2/
grub rescue> ls (hd0,msdos2)/boot/grub2/

Once you find the partition containing the GRUB files:

Set the prefix and root partition
grub rescue> set prefix=(hd0,msdos1)/boot/grub2
grub rescue> set root=(hd0,msdos1)
Load the normal module and boot
grub rescue> insmod normal
grub rescue> normal

After the system boots, immediately repair the GRUB configuration:

Reinstall GRUB (BIOS systems)
$ sudo grub2-install /dev/sda
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Reinstall GRUB (EFI systems)
$ sudo dnf reinstall grub2-efi-x64 shim-x64
$ sudo grub2-mkconfig -o /boot/efi/EFI/$(. /etc/os-release && echo $ID)/grub.cfg

Emergency mode is triggered when systemd cannot complete basic initialization, such as when /etc/fstab contains a filesystem that cannot be mounted.

The screen displays:

Welcome to emergency mode! After logging in, type "journalctl -xb" to view
system logs, "systemctl reboot" to reboot, "systemctl default" to try again
to boot into default mode.
Give root password for maintenance
(or press Control-D to continue):

After logging in with the root password:

View boot log errors
$ journalctl -xb --priority=err
Check fstab for problematic mount entries
$ cat /etc/fstab
Try manually mounting all filesystems
$ mount -a 2>&1

If a specific partition is causing the problem:

Check disk and partition status
$ lsblk -f
$ blkid

After fixing the issue:

Reboot the system
$ systemctl reboot

Rescue mode boots from installation media and is used to repair a system that cannot start.

  1. Boot from an AlmaLinux / Rocky Linux installation ISO
  2. Select Troubleshooting from the boot menu
  3. Select Rescue a system

The system will detect the installed OS and mount it to /mnt/sysimage.

Switch to the installed system environment
$ chroot /mnt/sysimage

You can now execute repair commands as if you were on the normal system.

View available partitions
$ lsblk -f
Manually mount the root partition
$ mount /dev/sda2 /mnt/sysimage
Mount the boot partition
$ mount /dev/sda1 /mnt/sysimage/boot
Mount necessary virtual filesystems
$ mount --bind /dev /mnt/sysimage/dev
$ mount --bind /proc /mnt/sysimage/proc
$ mount --bind /sys /mnt/sysimage/sys
$ mount --bind /run /mnt/sysimage/run
chroot into the system
$ chroot /mnt/sysimage

Single user mode is used to troubleshoot issues in a minimal environment, such as resetting the root password.

  1. Press e at the GRUB boot menu to edit the boot entry
  2. Find the line starting with linux (containing vmlinuz)
  3. Append to the end of that line: rd.break or init=/bin/bash
  4. Press Ctrl+X to boot
Remount the root filesystem as read-write
switch_root:/# mount -o remount,rw /sysroot
Switch to the system root directory
switch_root:/# chroot /sysroot
Reset the root password
sh-4.4# passwd root
If SELinux is in enforcing mode, trigger a relabel
sh-4.4# touch /.autorelabel
Exit and reboot
sh-4.4# exit
switch_root:/# exit

Note: touch /.autorelabel triggers a relabel of the entire filesystem’s SELinux labels on the next boot. This process may take anywhere from a few minutes to tens of minutes depending on the number of files. Do not force a shutdown during this process.

View current boot logs
$ journalctl -b
View previous boot logs
$ journalctl -b -1
View only error-level boot logs
$ journalctl -b -p err
List all available boot records
$ journalctl --list-boots
View kernel ring buffer messages
$ dmesg | less
View only errors and warnings
$ dmesg --level=err,warn
View storage-related messages
$ dmesg | grep -i -E '(sd[a-z]|nvme|ata|scsi)'

By default, journald logs on EL systems may not be persisted. Enabling persistence allows you to view previous boot logs:

Create the persistent log directory
$ sudo mkdir -p /var/log/journal
$ sudo systemd-tmpfiles --create --prefix /var/log/journal
$ sudo systemctl restart systemd-journald

Errors in /etc/fstab are a common cause of boot failures.

  • UUID does not match the actual partition (after disk replacement)
  • References a non-existent partition
  • Incorrect mount options
  • NFS/CIFS remote mounts attempted before network is ready
View the current disk UUIDs
$ blkid
Compare with the UUIDs in fstab
$ cat /etc/fstab
Verify fstab for syntax errors
$ sudo findmnt --verify --tab-file /etc/fstab

If a partition’s UUID has changed:

Get the new UUID with blkid and update fstab
$ sudo blkid /dev/sda2

Example output: /dev/sda2: UUID="xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"

Edit fstab and replace the old UUID
$ sudo vi /etc/fstab

For network filesystem mounts, add the _netdev and nofail options:

server:/export /mnt/nfs nfs defaults,_netdev,nofail 0 0

nofail ensures the system boots normally even if the mount fails. _netdev ensures the mount waits for the network to be ready.

Reinstall GRUB to the MBR
$ sudo grub2-install /dev/sda
Regenerate the GRUB configuration file
$ sudo grub2-mkconfig -o /boot/grub2/grub.cfg
Reinstall EFI boot files
$ sudo dnf reinstall grub2-efi-x64 shim-x64
Regenerate GRUB configuration
$ sudo grub2-mkconfig -o /boot/efi/EFI/$(. /etc/os-release && echo $ID)/grub.cfg
Verify EFI boot entries
$ efibootmgr -v

If the system is completely unable to boot, after entering rescue mode from installation media:

chroot into the system (assuming it is mounted at /mnt/sysimage)
$ chroot /mnt/sysimage
Reinstall kernel and GRUB (BIOS)
$ dnf reinstall kernel-core
$ grub2-install /dev/sda
$ grub2-mkconfig -o /boot/grub2/grub.cfg
Reinstall kernel and GRUB (EFI)
$ dnf reinstall kernel-core grub2-efi-x64 shim-x64
$ grub2-mkconfig -o /boot/efi/EFI/$(. /etc/os-release && echo $ID)/grub.cfg

dracut is responsible for generating the initramfs (initial RAM filesystem), which contains the drivers and tools needed during the boot stage.

  • dracut-initqueue timeout during boot
  • Cannot find root filesystem
  • Drops into the dracut emergency shell
dracut-initqueue[xxx]: Warning: dracut-initqueue timeout
dracut-initqueue[xxx]: Warning: Could not boot.
View available disks in the dracut shell
dracut:/# ls /dev/sd* /dev/nvme*
View dracut logs
dracut:/# journalctl
Regenerate initramfs for the current kernel
$ sudo dracut --force
Regenerate for a specific kernel version
$ sudo dracut --force /boot/initramfs-$(uname -r).img $(uname -r)
Include additional driver modules
$ sudo dracut --force --add-drivers "megaraid_sas mpt3sas" /boot/initramfs-$(uname -r).img $(uname -r)

Missing storage drivers: If the storage controller was changed or the VM was migrated to a different platform:

List modules included in the initramfs
$ lsinitrd /boot/initramfs-$(uname -r).img | grep -i driver
Add virtio drivers (for KVM/QEMU virtual machines)
$ sudo dracut --force --add-drivers "virtio_blk virtio_scsi virtio_net virtio_pci"

Corrupted initramfs file:

Check initramfs file size (should be at least tens of MB)
$ ls -lh /boot/initramfs-*.img

If the file size is abnormal (e.g., only a few KB), the file is corrupted and needs to be regenerated.

  1. Select the older kernel version from the GRUB boot menu
  2. If the GRUB menu does not appear (countdown too short), repeatedly press Esc or hold Shift during boot
After booting the old kernel, view installed kernels
$ rpm -qa kernel-core | sort -V
Set the default kernel back to the old version
$ sudo grubby --set-default /boot/vmlinuz-<old-kernel-version>
Remove the problematic new kernel
$ sudo dnf remove kernel-core-<problematic-version>