How to Fix GRUB Boot Issues on AlmaLinux (BIOS & UEFI) Without Losing Your Data

Estimated reading: 2 minutes 1914 views

Introduction

If your AlmaLinux VPS fails to boot — showing a black screen, stuck at grubrescue>, or errors like no such device,  not found or unknown filesystem — the GRUB bootloader might be broken or misconfigured.

This guide will help you reinstall GRUB from Rescue Mode, whether your VPS uses BIOS (Legacy) or UEFI.

Before You Begin

Log in to SolusVM

To access Rescue Mode or the console, first log in to SolusVM:

🔗 How to manage your KVM VPS via SolusVM

Backup Your Data

Some steps below modify your system disk — including filesystem checks, GRUB reinstallation, or kernel reconfiguration. Always back up your VPS beforehand to avoid data loss:

🔗 How to use Rescue Mode in SolusVM

Step 1: Boot into Rescue Mode

  1. From SolusVM, enable Rescue Mode

  2. Reboot the VPS

  3. Open VNC or Console

  4. At the rescue shell prompt, choose Skip when asked to mount the system automatically

Step 2: Check Your Boot Mode (BIOS vs UEFI)

bootctl status

  • If it shows Not booted with EFI → the system uses BIOS (Legacy)

  • If it shows UEFI firmware info → the system uses UEFI

Step 3: Reinstall GRUB

1. Identify the root partition

lsblk

Look for the disk with your Linux system (e.g., /dev/vda1)

2. Mount and chroot into the system

mount /dev/vda1 /mnt 
mount --bind /dev /mnt/dev 
mount --bind /proc /mnt/proc 
mount --bind /sys /mnt/sys 
chroot /mnt

You may ignore any setlocale warnings.

3. Reinstall GRUB

For BIOS (Legacy Boot)

grub2-install /dev/vda 
grub2-mkconfig -o /boot/grub2/grub.cfg

For UEFI Boot

grub2-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=almalinux --recheck 
grub2-mkconfig -o /boot/efi/EFI/almalinux/grub.cfg
If an error occurs, fall back to:
grub2-mkconfig -o /boot/grub2/grub.cfg

4. Exit rescue mode and reboot

exit
reboot

Conclusion

Once you’ve completed the above steps, your AlmaLinux VPS should be able to boot normally. If the system still fails to boot, check:

  • Whether the correct partition was mounted

  • If the boot entry exists (efibootmgr)

  • Disk integrity using fsck

Share this Doc

How to Fix GRUB Boot Issues on AlmaLinux (BIOS & UEFI) Without Losing Your Data

Or copy link

CONTENTS