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 had Windows 7 and Ubuntu on my hard disk. I had installed Ubuntu using Wubi. To uninstall Ubuntu I deleted the Ubuntu partitions from Windows 7 Disk Management. When I re-boot my computer it shows grub rescue>. What do I need to do to re-gain access to Windows? I do not have a Windows 7 DVD. Commands like rootnoverify, chainloader do not work in grub rescue. I get an unknown command error. PS: I am posting this from another computer :)

share|improve this question
1  
Please indicate your Boot-Info URL. –  LovinBuntu Oct 21 '12 at 21:07
add comment

3 Answers 3

It doesn't sound like you installed with Wubi as it a) doesn't create partitions and b) doesn't install the Grub bootloader to the drive MBR. What is more likely is that you did a normal dual boot, and now that you've removed the Ubuntu partitions, Grub can no longer boot (most of Grub's code is stored on the partition and without it you end up at a Grub rescue prompt). I doubt that you can boot Windows from the grub rescue because you've remove the partitions already (you'll need grub modules to boot).

So what you need to fix it is to reinstall a Windows bootloader, either from a Windows repair CD prompt: bootrec /fixmbr, or you can install something like lilo from a linux live CD:

sudo apt-get install lilo
sudo lilo -M /dev/sda mbr

Or if you use something like boot-repair it will install another Windows-style bootloader. Either of these will get Windows booting again.

PS if you use lilo then you'll get a big warning while installing, which you can safely ignore.

share|improve this answer
    
Thanks! I am considering purchasing a Windows 7 DVD. Just for the sake of experimenting I inserted a Windows Vista DVD of my laptop and it gave me an 'no such partition' error. Is it likely that the same problem will occur when I insert my Windows 7 DVD. If that's the case I would rather not purchase it –  Parth Shah Oct 21 '12 at 3:58
    
You can purchase a Windows 7 repair disk for US$10 online here: systemdiscs.com (Or just use a free Ubuntu CD and install lilo) –  bcbc Oct 21 '12 at 4:02
    
I have Ubuntu in my lappy so I do not want to have it in my Desktop Computer. So I'll be buying a Windows 7 disc. –  Parth Shah Oct 21 '12 at 4:06
    
I'm not suggesting you install Ubuntu. You just need a Windows style bootloader which you can install off an Ubuntu live CD. Or a Windows repair CD. It's not necessary to by a Windows install DVD as Windows is fully installed and working. You just need the bootloader. –  bcbc Oct 21 '12 at 4:24
add comment

Don't worry I have a nice solution.

If you want to keep just windows follow this guide

. you will need Windows Installation Disk or Windows Repair disk.

To Create Windows 7 Repair disk , Get any PC or laptop having Windows 7. On start button search menu type "CREATE System REPAIR DISK", select option comes

You will be ask for a Blank DVD, Insert Disk and Burn It, Make a .ISO file with using software named "POWER ISO" In windows 7.

With using Power ISO you will be able to Make bootable pendrive of windows 7 disk by going in TOOLS > Create Bootable USB Or PENDRIVE.

Provide it path of .iso file earlier you created. Now you will be able to run your Pendrive as a repair Disk.

To remove GRUB:

Grab a Windows recovery media or installation CD and boot from it. You should see this on a recovery media.

You should see this on an installation media. Click "Repair your computer" and you

Open the Command Prompt, then type

bootrec /fixmbr

into the Command Prompt.

Reboot your system now you will be able to load your windows 7.

If you want to repair grub and dual boot windows 7 and ubuntu then you have to fix grub follow this guide to do it.

You need Ubuntu 12.04 livecd for repairing grub boot loader . Here assuming the Ubuntu partition is sda7. Boot up ubuntu from the livecd,open terminal and run:

sudo -i and see what is your linux partition and note it I assume it sda7 here.

mount /dev/sda7 /mnt  

mount /dev/sda7 /mnt/boot

grub-install --root-directory=/mnt/ /dev/sda

mount --bind /proc /mnt/proc

mount --bind /dev /mnt/dev

mount --bind /sys /mnt/sys

chroot /mnt update-grub

umount /mnt/sys

umount /mnt/dev

umount /mnt/proc

exit

This will Solve your problem

share|improve this answer
    
The DVD-ROM in my laptop is not working. Is there some way to create system recovery directly on the pendrive? –  Parth Shah Oct 21 '12 at 11:28
    
I have already mention to make bootable pendrive. Read perfectly –  K.K Patel Oct 22 '12 at 10:42
    
Yes but how will I provide path of ISO? Windows allows me to create a System Repair Disk only on DVD. –  Parth Shah Oct 22 '12 at 17:31
    
You must need DVD, so you need to write it after you have to make ISO with using Poweriso from it. You have to provide path of that iso. –  K.K Patel Oct 23 '12 at 5:03
    
I borrowed my friend's portable DVD-ROM, followed the steps above and my computer's sanity has been restored. Thanks Mr. Patel! :) –  Parth Shah Oct 23 '12 at 15:48
show 1 more comment

The chroot solution will definitely help to fix the grub configuration, at least you will be able to boot into Linux or Windows.

You will need to download Ubuntu or some other ISOs (System Rescue CD) and make a Live USB using unetbootin then follow K.K Patel's chroot instructions;-)

share|improve this answer
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.