Fixing GRUB Rescue Error During Windows Update on Your Dual Boot System

Today, I decided to update Windows on my Windows/Linux dual boot system. After leaving it alone for 20 minutes, I returned to find the dreaded message:

grub rescue> during Windows update

After taking a moment to breathe and remember that Windows updates love to restart the system — and often overwrite GRUB — I set out to fix it.

Hi, my name is Suyesh Prabhugaonkar, and I’m a Security Consultant with specializations in risk remediation, incident response, and cloud infrastructure. I’ve helped many of my clients bridge the gap between their expectations and reality when it comes to their business operations and security posture by utilizing a data-driven approach.

I’m writing this short article for those who may be new to the Linux dual boot environment and thinking they may have to start from scratch. At the end, I mention some key takeaways that will help you immensely in future incidents. Here’s a quick guide on how to resolve this issue using GRUB rescue commands:

Using GRUB Rescue Commands

1. List Your Partitions

At the grub rescue> prompt, type:

ls

This command displays all available partitions (e.g., (hd0,gpt1), (hd0,gpt2), etc.). These are your clues to finding the partition that holds your Linux system.

2. Identify Your Linux Partition

Check each partition to locate where your Linux system is installed. For example, to inspect the first partition, type:

ls (hd0,1)/

Look for familiar directories like boot or etc that indicate you’ve found your Linux partition.

3. Set the Correct Root and Prefix

Once you identify the correct partition (let’s say it’s (hd0,gpt5)), set it as the root by executing:

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

This sequence loads the normal module and should bring up the standard GRUB menu.

4. Boot Into Linux

Once the GRUB menu appears, select your Linux system to boot into your regular desktop environment.

5. Repair GRUB Permanently

After logging into Linux, open a terminal and run:

sudo update-grub
sudo grub-install /dev/sda

Note: Replace /dev/sda with your boot disk if it’s different. To find out which disk is your boot disk, use the following methods:

Using the fdisk Command

List all disks and partitions:

sudo fdisk -l

Look for the disk that contains your Linux partitions (the one with / or /boot).

Using the lsblk Command

View a tree structure of your disks:

lsblk

Identify the disk that has your Linux root (/) or boot partitions. If you see that /dev/sda has a partition mounted at / and possibly /boot or an EFI partition (if you’re using UEFI), then /dev/sda is your boot disk.

Lessons Learned

  1. Always Back Up Your Files:
    Never underestimate the importance of a backup. You never know when something might go wrong.
  2. Stay Calm and Systematic:
    When issues arise, keep a calm approach. Work step by step to find the root cause instead of trying to jump straight from A to Z.
  3. Understand Your System:
    Familiarize yourself with basic Linux commands. Knowing how to inspect partitions and determine your boot disk can save you a lot of time and stress.
  4. Document Your Steps:
    Chances are, this issue may occur again. Documenting your steps to fix not only saves you time in future incidents, but also lets you trace your actions back if you make a mistake. Then you can seek out help from experts or other forums with an exact walkthrough of what happened so they can recreate your issue and find a fix.

By following these steps, you can fix the GRUB rescue error and get your dual boot system back to normal after a disruptive Windows update. Happy troubleshooting!

Leave a Reply