How to handle grub rescue problem in dual boot systems

Author - Webner

Description: In a dual boot system (Ubuntu/windows), if you delete the boot partition of ubuntu or delete the Linux operating system by formatting the drive then you will face the grub rescue problem.

In this problem we have two cases:

You have deleted the boot partition of Linux.
You have deleted the Linux os by formatting the drive.

In both of the above situations, the system will not be able to find the boot of any OS in the system, which means you won’t be able to boot any of the OS installed in your machine.

To overcome this problem, we have to write some commands in the grub rescue and need fresh Linux os (bootable Cd/pen drive) in case:

1. You have deleted the boot partition of Linux.

Start your machine → Now you have grub rescue error screen
Type ls on the screen → Now you have list like below:

grub rescue > ls
(hd0) (hd0,msdos5) (hd0,msdos3) (hd0,msdos2) (hd0,msdos1)
grub rescue > ls (hd0,msdos1) -- try to recognize your partition by selecting one by one
grub rescue > ls (hd0,msdos2) -- let's assume this is your Linux partition
grub rescue > set root=(hd0,msdos2)
grub rescue > set prefix=(hd0,msdos2)/boot/grub
grub rescue > insmod normal
grub rescue > normal -- press enter

Now you will able to boot into any of your available OS.

Note: Make sure you repair your boot partition error by repairing the OS with CD or pendrive otherwise you will face this problem again the next time you restart your your machine.

2. If you have deleted the Linux OS by formatting the drive.

Insert the CD of your Windows OS and boot it from your machine.
Select your country time and keyboard method and click next. Now follow the instructions:

Click on Repair your computer → Troubleshoot → Command prompt →
Type bootrec.exe /FixMbr press enter
Type bootrec.exe /FixBoot press enter
Type exit press enter/

Now restart your machine, your grub rescue problem is fixed.

Webner Solutions is a Software Development company focused on developing Insurance Agency Management Systems, Learning Management Systems and Salesforce apps. Contact us at dev@webners.com for your Insurance, eLearning and Salesforce applications.

Leave a Reply

Your email address will not be published. Required fields are marked *