Linux grub-rescueHigh

GRUB Rescue Error: Causes and Bootloader Recovery Methods

This article explains what GRUB Rescue mode is and provides several proven methods to recover the Linux bootloader so your system can boot again.

Updated at February 17, 2026
10-15 minutes
Medium
FixPedia Team
Применимо к:Ubuntu 20.04+Fedora 35+Debian 11+Linux with GRUB 2

What the GRUB Rescue Error Means

If, when you turn on your computer, you see the grub-rescue> command prompt instead of the usual boot menu, it means the GRUB bootloader cannot find its configuration files or modules. This isn't an error with a code in the traditional sense, but an emergency mode that allows you to manually specify paths and boot the system.

Typical output:

grub-rescue> 

The system won't boot further, and you find yourself in a limited environment with a minimal set of commands.

Common Causes

The GRUB Rescue error occurs due to the following specific reasons:

  1. MBR/GPT corruption: The disk's boot sector (MBR) or boot partition (EFI System Partition) has been overwritten, for example, after installing another OS or a system crash.
  2. Deletion or relocation of GRUB files: Files in the /boot/grub directory (or /boot/efi/EFI/ubuntu for UEFI) were deleted, corrupted, or moved to a different partition.
  3. Incorrect configuration changes: Errors in the /etc/default/grub file or scripts in /etc/grub.d/ after manual editing without subsequently running update-grub.
  4. Disk failure: Development of bad sectors on the disk where GRUB files are stored, or complete drive failure.
  5. Incorrect BIOS/UEFI settings: Changing the boot order, disabling Secure Boot without corresponding GRUB configuration.

Method 1: Recovery via GRUB Rescue Mode

If you are at the grub-rescue> prompt, you can try to manually boot the system without using a LiveCD.

  1. Locate the partition containing GRUB files. Run:
    ls
    

    You will see a list of disks and partitions, e.g., (hd0) (hd0,gpt1) (hd0,gpt2). Then check each one:
    ls (hd0,gpt1)/
    

    Look for the boot directory or files like vmlinuz (kernel) and initrd. Once found, note that partition (e.g., (hd0,gpt1)).
  2. Set the root and prefix variables:
    set root=(hd0,gpt1)
    set prefix=(hd0,gpt1)/boot/grub
    

    For UEFI systems, the path might be (hd0,gpt1)/boot/efi/EFI/ubuntu.
  3. Load the normal GRUB module:
    insmod normal
    

    If the module is not found, the prefix path may be incorrect.
  4. Switch to normal GRUB mode:
    normal
    

    If everything is correct, the GRUB menu will appear. Select a kernel and boot.
  5. After successful boot, fix the configuration. In the OS terminal, run:
    sudo update-grub
    

    This will regenerate the configuration and check for the presence of files.

⚠️ Important: This method provides a temporary boot. If the problem is corrupted files, the error may recur after a reboot. Be sure to run update-grub and, if necessary, reinstall GRUB (see Method 3).

Method 2: Using a Bootable Medium (LiveCD/USB)

If rescue mode doesn't help or you cannot find the correct partitions, use a bootable medium with any Linux system (Ubuntu, Fedora, Debian).

  1. Boot from the Live medium. Choose the "Try Ubuntu" or similar option to get a working desktop.
  2. Identify partitions. Open a terminal and run:
    sudo fdisk -l
    

    Find the root partition (e.g., /dev/sda2) and the /boot partition (if separate). For UEFI, also locate the ESP (FAT32, type EFI System).
  3. Mount the partitions. For a standard setup:
    sudo mount /dev/sda2 /mnt
    sudo mount /dev/sda1 /mnt/boot   # if /boot is separate
    

    For UEFI:
    sudo mount /dev/sda1 /mnt/boot/efi
    

    Also mount system virtual filesystems:
    for i in /dev /dev/pts /proc /sys /run; do sudo mount --bind $i /mnt$i; done
    
  4. Enter the chroot environment:
    sudo chroot /mnt
    
  5. Reinstall GRUB:
    • For BIOS/MBR:
      grub-install /dev/sda
      update-grub
      
    • For UEFI:
      grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=ubuntu
      update-grub
      
  6. Exit and reboot:
    exit
    sudo reboot
    

    Remove the Live medium when rebooting.

Method 3: Manual Recovery of GRUB Files (If They Are Damaged)

If files in /boot/grub are missing or corrupted, you can restore them from the package.

  1. From within the chroot environment (as in Method 2), reinstall the GRUB package:
    • For Ubuntu/Debian:
      apt-get install --reinstall grub-pc grub-common
      
    • For Fedora:
      dnf reinstall grub2-tools
      
  2. Update the configuration:
    update-grub   # Ubuntu/Debian
    grub2-mkconfig -o /boot/grub2/grub.cfg   # Fedora
    
  3. Check file integrity:
    ls -la /boot/grub
    

    You should see files like grub.cfg and i386-pc or x86_64-efi modules.

Method 4: Using the Boot-Repair Utility (For Ubuntu and Derivatives)

Boot-Repair is an automated tool that often fixes GRUB problems.

  1. In a Live Ubuntu session, add the repository and install:
    sudo add-apt-repository ppa:yannubuntu/boot-repair
    sudo apt update
    sudo apt install boot-repair
    
  2. Launch it:
    boot-repair
    
  3. Select "Recommended repair". The utility will automatically detect the issue and fix GRUB, MBR/ESP.
  4. Follow on-screen instructions. At the end, a URL with a log will appear—save it in case the problem recurs.

Prevention

To avoid ending up in GRUB Rescue again:

  1. Back up the bootloader:
    sudo dd if=/dev/sda of=~/mbr-backup.img bs=512 count=1   # for BIOS
    sudo cp -r /boot/grub ~/grub-backup/                     # GRUB files
    

    For UEFI, copy the ESP directory:
    sudo cp -r /boot/efi/EFI ~/efi-backup/
    
  2. Careful partition management: Do not change partition order or delete unknown partitions, especially those of type EFI System or with the boot flag.
  3. Regularly update GRUB: After installing a new kernel or making changes to /etc/default/grub, always run sudo update-grub.
  4. Monitor disk health: Once a month, check the S.M.A.R.T. status:
    sudo smartctl -a /dev/sda
    

    And filesystems:
    sudo fsck -f /dev/sda2
    
  5. Avoid installing Windows after Linux: If you need to install Windows, do it before Linux or be prepared to manually restore GRUB afterward.
  6. Use LVM or RAID with caution: Complex storage schemes increase the risk of boot problems. Ensure your initramfs contains the necessary modules.

F.A.Q.

What is GRUB Rescue and why does it appear?
Can GRUB Rescue be fixed without a LiveCD?
How to prevent GRUB Rescue from appearing?
What to do if commands in rescue mode don't work?

Hints

Identify GRUB partitions and files
Set the correct variables
Manually load the kernel
Reinstall GRUB from LiveCD
Check disk integrity

Did this article help you solve the problem?

FixPedia

Free encyclopedia for fixing errors. Step-by-step guides for Windows, Linux, macOS and more.

© 2026 FixPedia. All materials are available for free.

Made with for the community