Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

1 Answer

(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" an 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.

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
add comment

Your Answer

 
discard

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.