Time Server
Post by
Author Syukra

Published on Feb 11, 2025

Estimated reading time: 4 minute

How to Overcome Grub Rescue Boot Failure: Complete Guide

Fix Grub Rescue

Grub Rescue Boot Failure is one of the problems that often occurs to Linux users, especially for those who use dual-boot with Windows. When an error occurs in the GRUB bootloader, the operating system cannot be loaded normally, so users only see an error message like “grub rescue>” on the screen. This article will discuss in detail how to solve this problem, from the causes to the solution steps.

What is Grub and Why Does Boot Failure Occur?

GRUB (Grand Unified Bootloader) is the main bootloader used by many Linux distributions. Its main function is to load the operating system into memory and initialize the Linux kernel.

However, sometimes GRUB experiences problems, which cause boot failure and enter rescue mode. Some common causes of this problem include:

  1. Missing or Corrupted Boot Partition - If the partition that stores GRUB is deleted or corrupted, the bootloader cannot find the operating system.
  2. Failed Update or Upgrade - A failed update can cause the GRUB configuration to be damaged.
  3. GRUB Configuration Error - Improper modification of GRUB files can cause errors.
  4. Partition Changes - If the partition has changed due to resizing or installing another OS, GRUB may not be able to find the correct operating system.
  5. Hard Disk or SSD Problems - Damage to the storage media can cause GRUB to be unable to read data correctly.

How to Fix Grub Rescue Boot Failure

Here are some methods that can be used to fix GRUB that is having problems.

1. Using Rescue Mode for Manual Booting

If you are stuck in grub rescue> mode, the first step is to try booting manually:

  1. Type ls to see a list of available partitions.
  2. Identify the partition that contains the operating system by typing:
ls (hd0,msdos1)/
  1. Replace (hd0,msdos1) with the appropriate partition.

  2. Once you have found the root partition, set root and boot with the following commands:

set root=(hd0,msdos1)
set prefix=(hd0,msdos1)/boot/grub
insmod normal
normal
  1. If successful, you will enter the normal GRUB menu and be able to boot into the operating system.

2. Repair GRUB with a Linux Live CD or USB

If the above method does not work, you can use a Live CD or Live USB to repair GRUB:

  1. Boot to Live Linux - Use Linux installation media (eg Ubuntu Live USB).
  2. Open Terminal and run the following commands to find the Linux root partition:
sudo fdisk -l
  1. Mount Root Partition
sudo mount /dev/sdXn /mnt

Replace /dev/sdXn with the appropriate partition.

  1. Mount Additional Directories
sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys
  1. Enter Chroot Environment
sudo chroot /mnt
  1. Reinstall GRUB
grub-install --target=i386-pc /dev/sdX

Replace /dev/sdX with the appropriate disk.

  1. Update GRUB Configuration
update-grub
  1. Exit Chroot and Reboot
exit
sudo reboot

3. Using Boot Repair Tool

If you are not comfortable with manual commands, you can use Boot Repair Tool:

  1. Boot to Live Linux
  2. Install Boot Repair with the command:
sudo add-apt-repository ppa:yannubuntu/boot-repair
sudo apt update
sudo apt install boot-repair
  1. Run Boot Repair
boot-repair
  1. Select the Recommended Repair option and follow the instructions.
  2. Reboot the computer when finished.

Prevention to Prevent GRUB from Experiencing Boot Failure

After repairing GRUB, it is recommended to do the following steps to prevent this problem from happening again:

  1. Do Not Delete or Change Boot Partition Without Backup
  2. Use Boot Repair Before Doing a Major Upgrade
  3. Save a Linux Live USB for Emergency
  4. Do Not Install a New Operating System Without Checking GRUB Configuration
  5. Use a Good and Unproblematic SSD or HDD

Conclusion

Grub Rescue Boot Failure is a common problem that can be solved with various methods, ranging from manual booting to reinstalling GRUB using a Live CD. By understanding the causes and troubleshooting steps, Linux users can overcome this error more easily. In addition, taking precautions can reduce the chances of this error occurring in the future.

By following this guide, you can ensure that your Linux system continues to run smoothly and is free from bootloader problems.

Tag: #Tutorial
Share Article

Follow My Social Media