Super User is a question and answer site for computer enthusiasts and power users. 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 have windows 7 netbook. I repartitioned 100GB size and I installed Ubuntu 11.4 on it and boot master is GRUB. Today, I accidentally chose Windows Recover Partition, it loaded up and I exited it right away. The computer restarted and Grub Rescue prompt came up. error no such partition grub rescue >

Can someone help me fix it? I have important data on both Ubuntu and Windows 7 that I need.

share|improve this question
up vote 1 down vote accepted

Your data is still there, don't reformat.

There are lots of things you can try to recover this situation.

Backup | dd

First, use dd to copy your entire drive to another drive as backup, BEFORE doing anything else. This way you'll have something to revert to in case you take a wrong turn.

For Example:

dd if=/dev/hda conv=sync,noerror bs=64K | gzip -c > /mnt/sda1/hda.img.gz

Partition Recovery | TestDisk

The Linux utility "TestDisk" has shown to be quite helpful to me for this kind of thing. Give that a try first.

Booting | Super Grub Disk

You may find Super Grub Disk profoundly helpful if you get your partitions in good shape, but just can't boot anymore.

(edited) Booting | Windows Installation Disk

You can use the Windows Installer to "repair" your Windows installation so it boots again. Then you can fix grub any number of ways. A solution I actually prefer is to just use "EasyBCD" to create an entry point to Grub using the Windows 7 boot manager (which is atypically excellent MS sw).

Recovering if using GPT | gdisk

I've also found gdisk to be outstanding, but if you're not using a gpt partition scheme, then that probably won't help you at all. Though, if you're running out of luck, give it a try, not sure if it'll work with MBR at all.

share|improve this answer
    
can I use Windows 7 DVD to fix the boot and get to Windows 7 first bootrec.exe /fixmbr bootrec.exe /fixboot bootrec.exe /RebuildBcd Then reinstall Grub using Ubuntu Live USB? – stacker1412 Sep 21 '11 at 22:37
    
Yes, good call, that should be fine - though ONLY if your partition schema hasn't been messed up. And if you're really worried about your data, do that backup first. I've added your suggestion to my answer above. – Doc Sep 21 '11 at 22:49

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .