GRUB (GRand Unified Bootloader) is the software that starts your Linux operating system when the server powers on. If GRUB is damaged or misconfigured, the server cannot boot. This guide explains how to reinstall GRUB using the Linux Rescue System.
Prerequisite: This guide assumes your server is already running in rescue mode and you are connected via SSH. → Starting rescue mode
First, identify your partition device names using lsblk:
Then mount the root partition to /mnt and the boot partition to /mnt/boot — adjust the device names to match your lsblk output:
This example assumes a non-RAID setup. Device names such as sda1, sda3 may differ on your server.
Bind-mount the essential system directories from the rescue system into your mounted filesystem:
Enter the chroot environment:
Reinstall GRUB on the primary boot drive — replace /dev/sda with your actual device name. Do not include a partition number:
If you are using a software RAID (RAID1), you must install GRUB on both drives — e.g. grub-install /dev/sda followed by grub-install /dev/sdb.
Regenerate the GRUB configuration file (while still inside the chroot):
Exit the chroot and the SSH session:
Finally, go to your PowerPanel and cancel rescue mode so the server reboots normally. → Cancelling rescue mode
For more information on GRUB configuration options, refer to the official GNU GRUB documentation.