Resolve GRUB Rescue and Boot into Windows

Table of Contents

Step-by-Step Guide to Resolve GRUB Rescue and Boot into Windows

If you tried removing Linux and are now greeted with a black screen with “Grub Rescue” on it, don’t panic—we’ve all been there. We’ll get through it without affecting any other data by following a few simple steps.

Why This Occurred

When you installed Linux, it created a folder in the main EFI partition alongside Windows. This folder pointed to the partition where Linux was installed, and when you removed Linux (likely using Windows partition tools), the computer panicked because it couldn’t find the necessary folder. We can fix this by getting your system back to Windows and updating the boot manager.

Step-by-Step Guide to Fix the Grub Rescue Screen

1. Enter the GRUB Rescue Prompt

First, you will see the “Grub Rescue” prompt. Here, we will manually configure the bootloader so that we can get back into Windows. Start by entering the following commands one by one:

insmod part_gpt
insmod chain
ls

2. List Partitions

Next, list the partitions on your system using the ls command. This will show all the partitions on your drives. You’ll need to look through these partitions for the one that contains the boot files for Windows.

ls

3. Find the Boot Folder

For each partition, check if it contains a boot folder. You can do this by running:

ls (hd0,gpt1)/

Repeat this for each partition, replacing (hd0,gpt1) with the corresponding partition names (like (hd0,gpt2)).

4. Locate Microsoft Boot Manager

Once you find the partition containing the boot folder, check if the Microsoft Boot Manager exists. The path should look something like this:

(hd0,gpt1)/efi/microsoft/boot/bootmgfw.efi

If the Microsoft Boot Manager exists in that folder, proceed with the next steps. If not, continue searching the remaining partitions.

5. Chainload the Windows Boot Manager

If you found the Microsoft Boot Manager (bootmgfw.efi), you can load it by using the chainloader command. Type the following:

chainloader (hd0,gpt1)/efi/microsoft/boot/bootmgfw.efi
boot

This will initiate the Windows boot process.

6. Boot into Windows

After typing the above command, your system should boot into Windows. If it doesn’t work, repeat the process or check other partitions. Once you’re in Windows, we can fix the boot manager.

Change the Default Boot Manager

Once in Windows (or even if you didn’t manage to fully boot), open the Command Prompt with Administrator privileges. You can do this by right-clicking on the Start button, selecting “Command Prompt (Admin)” or “Windows PowerShell (Admin)”.

Now, use the following commands to set the default boot manager back to Windows:

  1. First, check the current boot manager:

    bcdedit
    

    Look for the entry under “Windows Boot Manager”. It will likely show grubx64.efi as the path for the boot manager. We’ll need to change this to the Windows Boot Manager.

  2. Change the boot manager to the Windows Boot Manager:

    bcdedit /set {bootmgr} path \efi\microsoft\boot\bootmgfw.efi
    

This will reset the default bootloader to the correct Windows boot manager.

Removing the GRUB Partition

Now that the boot manager is fixed, let’s remove the leftover GRUB partition to completely eliminate GRUB from your system.

1. Open Command Prompt as Administrator

First, open the Command Prompt as Administrator again.

2. Launch Diskpart

Type the following commands to manage your disk partitions:

diskpart
list disk
select disk 0
list partition

3. Select the GRUB Partition

Look for the partition that has the “system” type—this is usually the GRUB partition. Select it:

select partition 2

4. Assign a Drive Letter

To access the partition, assign it a drive letter:

assign letter=z

This will allow you to access the partition as a drive in the file manager, where you’ll see it as “Z”.

5. Delete the GRUB Files

Now, navigate to the partition and delete the GRUB files:

exit
z:
cd efi
dir
rd (name_of_your_linux_grub) /s

It will ask for confirmation to delete the directory. Type Y to confirm.

6. Exit and Restart

Once the GRUB folder is deleted, type exit to exit Diskpart, and restart your system.

exit

Your system should now boot directly into Windows without showing the “Grub Rescue” screen. You are now free of the GRUB problem!


Conclusion

You’ve successfully fixed the GRUB Rescue error and restored your Windows boot manager. By following these simple steps, you managed to repair your system without affecting your existing data. If you encounter any further issues, feel free to revisit the steps or ask for additional help. Good luck!