This guide provides a version-aware, step-by-step approach to diagnosing and fixing GRUB issues in all supported RHEL versions.
1. Common GRUB Issues in RHEL
Symptom Likely Cause
No GRUB menu → Missing or corrupted GRUB
grub> prompt → GRUB config missing
grub rescue> → Core GRUB files missing
Boot loops → Wrong kernel or root device
Kernel not found → Incorrect grub.cfg
System boots to rescue → Wrong kernel parameters
2. Understand GRUB Differences by RHEL Version
RHEL Version Firmware GRUB Location
RHEL 7 BIOS / UEFI /boot/grub2/grub.cfg
RHEL 8 UEFI default /boot/efi/EFI/redhat/grub.cfg
RHEL 9 UEFI only (mostly) /boot/efi/EFI/redhat/grub.cfg
RHEL 10 UEFI only (expected) /boot/efi/EFI/redhat/grub.cfg
3. Access the GRUB Menu
Reboot the system
Press Esc or Shift
If GRUB appears, select Advanced options
Try booting an older kernel
If this works, the issue is likely a broken kernel or config, not GRUB itself.
4. Fix Temporary GRUB Issues (Edit Boot Parameters)
Highlight the kernel
Press e
Find the line starting with linux
Common Debug Parameters
rd.break
systemd.unit=rescue.target
systemd.unit=emergency.target
selinux=0
nomodeset
Press Ctrl + X to boot.
5. Fix “grub>” or “grub rescue>” Prompt
Identify Boot and Root Partitions
ls
ls (hd0,gpt1)/
Set Correct Root
set root=(hd0,gpt1)
set prefix=(hd0,gpt1)/boot/grub2
insmod normal
normal
If GRUB loads, reinstall it permanently (see Section 8).
6. Boot Using RHEL Installation ISO (Rescue Mode)
This is the most reliable recovery method.
Boot from RHEL 7/8/9 ISO
Select:
Troubleshooting → Rescue a Red Hat Enterprise Linux system
Mount the system automatically
Enter shell
7. Chroot into Installed System
# chroot /mnt/sysimage
From here, all fixes apply directly to your installed OS.
8. Reinstall GRUB (Correct Method by Version)
RHEL 7 – BIOS Systems
# grub2-install /dev/sda
# grub2-mkconfig -o /boot/grub2/grub.cfg
RHEL 7 – UEFI Systems
# yum reinstall grub2-efi shim
# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
RHEL 8, 9, 10 – UEFI Systems
# dnf reinstall grub2-efi shim
# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
Verify EFI entries:
# efibootmgr -v
9. Rebuild GRUB Configuration Only (If GRUB Exists)
Sometimes only grub.cfg is broken.
RHEL 7 (BIOS)
# grub2-mkconfig -o /boot/grub2/grub.cfg
RHEL 8/9/10 (UEFI)
# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
10. Fix Wrong Root or UUID in GRUB
Check actual UUIDs:
# blkid
Update GRUB config if root device changed:
# grub2-mkconfig -o /boot/efi/EFI/redhat/grub.cfg
11. Fix GRUB After Disk or Partition Changes
If disk order changed (sda → sdb):
Verify disks:
# lsblk
Reinstall GRUB to correct disk:
# grub2-install /dev/sda
12. Secure Boot Issues (RHEL 8+)
If system fails after enabling Secure Boot:
# dnf reinstall shim grub2-efi kernel
Ensure Secure Boot–signed kernels are installed.
13. SELinux and GRUB Boot Failures
Temporary Fix
Edit GRUB kernel line:
selinux=0
Permanent Fix
# touch /.autorelabel
# reboot
14. Best Practices to Avoid GRUB Issues
- Keep multiple kernels installed
- Avoid manual GRUB edits
- Always regenerate grub.cfg after disk changes
- Keep rescue ISO available
- Use snapshots before kernel updates (VMs)
- Boot older kernel
- Rescue mode via ISO
- Chroot into system
- Reinstall GRUB
- Regenerate grub.cfg
- Verify EFI boot entries
GRUB issues across RHEL 7, 8, 9, and 10 follow the same recovery principles:
- Identify firmware (BIOS vs UEFI)
- Use rescue mode
- Reinstall GRUB properly
- Regenerate configuration files
No comments:
Post a Comment