How do I fix "Grub Rescue"? Uninstallation?

I am currently dual-booting windows 7 and Ubuntu. I am about to sell my computer so I was following a tutorial on how to uninstall Ubuntu. I had deleted my partitions like the tutorial said and now I get this:

error : no such partition grub rescue>_

I am now looking for help on

  1. Getting out of this "grub rescue"
  2. Uninstalling Ubuntu and/or factory reset

Notes -Newbie - No windows disks -I have spare CDs

1

2 Answers

(From within rescue mode)

Command: ls

It will list all your drives and partitions, like:

(hd0) (hd0,msdos2) (hd0,msdos1)

If you don't know your Ubuntu boot partition, check them one by one:

ls (hd0,msdos2)/
ls (hd0,msdos1)/

When you hit the right one, you'll get a line mentioning "lost+found" and so on.

Assuming (hd0,msdos2) is the right partition:

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

Now you'll be able to boot into Ubuntu. Once you do, execute the following commands:

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

Voila.

3

You could do either of two things:

  1. Use a Windows 7 installation CD, boot it, and search for the repair option. After that you will get many options; then search for 'command prompt'. Type the following commands into a command prompt one-by-one and press Enter.

  2. If you have any Linux installation CD/DVD or USB pendrive then live boot it and follow the steps shown on the page Boot-Repair. You will get the boot menu back.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like