Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

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

share|improve this question
Try boot-repair-disk ,it will help you to boot into windows. – Avinash Raj Nov 9 '13 at 7:53

(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

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

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


share|improve this answer
He deleted the ubuntu partitions, so I guess there is no ubuntu to boot to – Dr_Bunsen Nov 9 '13 at 11:33
Yes he deleted the ubuntu partition and try to recover windows partition. – Avinash Raj Nov 9 '13 at 11:39
A Win 7 recovery DVD can be written from any Win 7 machine. Boot from recovery DVD, choose to recover win loader from the graphic menu, or choose to enter command line and execute bootrec /fixmbr and bootrec /fixboot. – Pavel Nov 9 '13 at 14:24

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.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.