How to Fix GRUB Rescue in Windows and Linux

Seeing the grub rescue> prompt can be alarming because the computer may stop booting into Windows or Linux. Instead of loading the operating system normally, GRUB may display a message such as error: unknown filesystem followed by the grub rescue> prompt.

GRUB, or GRand Unified Bootloader, is commonly used by Linux installations to manage the boot process. Problems can occur after deleting a Linux partition, reinstalling Windows, changing partitions, moving drives, or damaging bootloader files.

The correct solution depends on whether you want to continue using Linux or return the computer to a Windows-only boot configuration. The methods below cover the most common recovery approaches.

Method 1: Identify the Correct GRUB Partition

If you are currently at the grub rescue> prompt, you can inspect the available disks and partitions before making changes.

Start by running:

ls

GRUB may display entries similar to:

(hd0)
(hd0,gpt1)
(hd0,gpt2)
(hd0,gpt3)

or:

(hd0,msdos1)
(hd0,msdos2)

You can inspect a partition with:

ls (hd0,gpt2)/

Try the available partitions one at a time.

If GRUB can read the partition, you may see directories or files. A Linux partition may contain directories such as:

/boot
/etc
/home
/usr

The exact layout depends on your Linux installation.

If you find the partition containing the GRUB files, you can attempt to point GRUB to it.

For example:

set root=(hd0,gpt2)
set prefix=(hd0,gpt2)/boot/grub
insmod normal
normal

Replace (hd0,gpt2) with the partition that actually contains your GRUB files.

If insmod normal works, the normal GRUB menu may appear.

This approach is useful when the GRUB configuration still exists but GRUB has lost track of its location.

Method 2: Boot Linux Temporarily From GRUB Rescue

If you locate the correct Linux partition but the normal GRUB menu does not appear, you may be able to load the normal GRUB module manually.

At the grub rescue> prompt, first locate the Linux installation:

ls

Then test partitions, for example:

ls (hd0,gpt3)/

Once you find the appropriate partition, set it as the root:

set root=(hd0,gpt3)

Set the GRUB prefix:

set prefix=(hd0,gpt3)/boot/grub

Then load the normal module:

insmod normal

Finally:

normal

If the menu appears, select Linux and allow it to boot.

Once you successfully enter Linux, repair the bootloader permanently rather than relying on these temporary commands.

Method 3: Repair GRUB From a Linux Live USB

If the commands above do not work, a Linux Live USB is often the better recovery method.

You will need a bootable Linux USB containing a distribution such as Ubuntu or another Linux distribution.

Boot the computer from the USB and choose the option to try Linux without installing it.

Once the live desktop loads, open Terminal.

First identify the installed Linux partitions:

lsblk

You can also use:

sudo fdisk -l

Look for the Linux system partition and, if applicable, a separate EFI System Partition.

Create a mount point:

sudo mount /dev/nvme0n1p3 /mnt

Replace /dev/nvme0n1p3 with your actual Linux system partition.

If your system uses a separate EFI partition, mount it as well. For example:

sudo mount /dev/nvme0n1p1 /mnt/boot/efi

The partition numbers on your computer may be different.

Then bind important system directories:

sudo mount --bind /dev /mnt/dev
sudo mount --bind /proc /mnt/proc
sudo mount --bind /sys /mnt/sys

Enter the installed system:

sudo chroot /mnt

You can now reinstall GRUB using the appropriate method for your system.

For a traditional BIOS installation, a command may look like:

grub-install /dev/sda

For a UEFI installation, the command and EFI configuration depend on the distribution and mounted EFI partition.

After repairing the bootloader, exit the chroot:

exit

Unmount the partitions, restart the computer, and remove the USB when instructed.

Do not blindly copy the device names from examples. Using the wrong disk or partition can damage the existing installation.

Method 4: Repair Windows Bootloader After Removing Linux

If you previously had a Windows/Linux dual-boot system and deleted Linux, the computer may still be trying to start GRUB even though the Linux installation is gone.

In that situation, repairing GRUB is not necessarily what you want. You may instead want Windows Boot Manager to become the primary bootloader again.

Create or use a Windows 11 installation USB and boot the computer from it.

On the Windows Setup screen:

  1. Select your language and keyboard options.
  2. Do not select Install now.
  3. Choose Repair your computer.
  4. Select Troubleshoot.
  5. Open Advanced options.
  6. Choose Command Prompt.

You can first identify the Windows installation:

diskpart

Then:

list volume

Look for the Windows partition and the EFI System Partition.

Exit DiskPart:

exit

On modern UEFI systems, you may need to assign a drive letter to the EFI partition before rebuilding Windows Boot Manager.

From DiskPart:

diskpart
list volume
select volume X
assign letter=S
exit

Replace X with the correct EFI System Partition number.

Then rebuild Windows boot files:

bcdboot C:\Windows /s S: /f UEFI

The Windows partition may not be C: while you are inside Windows Recovery Environment. If necessary, use DiskPart or test drive letters to determine which partition contains the Windows folder.

After the command completes successfully, restart the computer.

This can replace the broken GRUB-based boot path with Windows Boot Manager on a Windows-only system.

Method 5: Rebuild the GRUB Configuration From Linux

If Linux still boots but the GRUB menu is damaged or does not show the expected operating systems, you may only need to regenerate its configuration.

Boot into Linux and open Terminal.

On many distributions, you can run:

sudo update-grub

The command searches for installed operating systems and rebuilds the GRUB configuration.

After it completes, restart:

sudo reboot

If Windows is installed alongside Linux, the regenerated menu may detect Windows automatically depending on the distribution and its configuration.

If the GRUB program itself is missing or installed incorrectly, update-grub alone may not be enough. In that case, reinstalling GRUB may be necessary.

Method 6: Check for Partition Changes or Disk Problems

GRUB rescue errors frequently appear after partition changes.

For example, the problem may occur after:

  • Deleting a Linux partition.
  • Resizing a partition.
  • Reinstalling Windows.
  • Replacing a hard drive or SSD.
  • Moving an operating system to another disk.
  • Changing the partition layout.
  • Accidentally modifying the EFI System Partition.

At the grub rescue> prompt, errors such as:

error: unknown filesystem

can indicate that GRUB is trying to access a partition using an incorrect location or filesystem reference.

From a Linux Live USB, use:

lsblk -f

This displays partitions and their filesystem types.

You can also inspect the partition layout with:

sudo fdisk -l

If a partition is missing entirely, the problem may be related to partition changes rather than simply a GRUB configuration error.

Do not format or delete partitions while troubleshooting unless you are certain that they contain no required data.

Method 7: Set Windows Boot Manager as the Default

If Windows and Linux are both installed and you want Windows to boot by default, you can change the boot order through your computer’s UEFI firmware.

Restart the computer and enter the UEFI/BIOS setup. The required key varies by manufacturer and may be F2, Delete, Esc, F10, or another key.

Look for:

Boot Order, Boot Priority, or UEFI Boot Options.

If available, move:

Windows Boot Manager

above the Linux or GRUB entry.

Save the changes and restart.

This method does not repair damaged GRUB files, but it can solve situations where both bootloaders are healthy and Windows is simply not configured as the preferred boot option.

Method 8: Troubleshoot Persistent GRUB Rescue Errors

If the computer continues showing grub rescue> after attempting recovery, avoid repeatedly changing bootloader settings without identifying the underlying problem.

Check these items:

  1. Confirm whether you want a Linux dual-boot system or Windows-only system.
  2. Check whether the Linux partition still exists.
  3. Check whether the EFI System Partition is present.
  4. Verify that the Windows partition is intact.
  5. Check whether the correct disk is being used for booting.
  6. Use a Live USB to inspect the partition layout.
  7. Repair the appropriate bootloader rather than installing both bootloaders unnecessarily.

If important files are stored on the affected drive, consider backing up the data before making major partition or bootloader changes.

A GRUB rescue prompt does not necessarily mean that your personal files have been deleted. In many cases, the operating system and data are still present while the bootloader simply cannot locate them correctly.

Conclusion

The grub rescue> prompt usually means that GRUB cannot find the files or partition it needs to continue the boot process. The best solution depends on your system configuration and what you want the computer to boot.

If Linux is still installed, you can try locating the correct partition and loading GRUB manually. A Linux Live USB can be used for a more complete GRUB repair. If Linux was removed and you now want Windows only, repairing Windows Boot Manager is usually the more appropriate solution.

Always identify your partitions before running repair commands. Disk names and partition numbers vary between computers, and choosing the wrong partition can cause data loss. When important data is involved, back it up before performing major bootloader or partition operations.

FAQs

1. What does grub rescue> mean?

It means GRUB has entered its recovery shell because it cannot find or load the files required to start the normal boot process. This can happen after partition changes, Linux removal, bootloader damage, or disk configuration changes.

2. Can I fix GRUB rescue without reinstalling Windows or Linux?

Often, yes. If the operating system and its partitions are still intact, you may be able to restore the GRUB configuration or reinstall the bootloader without reinstalling the operating system.

3. How do I boot Windows after deleting Linux?

If Windows is the only operating system you want to keep, boot from Windows installation or recovery media and use the recovery tools to rebuild Windows Boot Manager. On UEFI systems, bcdboot can rebuild the Windows boot files when used with the correct Windows and EFI partition letters.

4. Will fixing GRUB delete my files?

A bootloader repair does not normally delete personal files. However, incorrect partition commands, formatting, or reinstalling an operating system can cause data loss. Always identify the correct partitions and back up important data before making major changes.

Quick Summary

  • grub rescue> usually indicates that GRUB cannot locate its required boot files or partition.
  • Use ls to identify available partitions and locate the Linux installation.
  • Use a Linux Live USB to repair GRUB when the built-in rescue prompt is insufficient.
  • If Linux has been removed, rebuild Windows Boot Manager instead of trying to restore GRUB.

Related Articles

Popular Categories