On a computer running windows 7, I created a new partition and installed Ubuntu on the empty partition. Then in windows, I deleted the partition that ubuntu was installed on. After restarting my computer, I get an error:

error: no such partition

It sounds like when ubuntu was installed, it wrote over the windows bootloader, and I deleted the partition that Ubuntu's was on.

It sounds like I can reinstall the windows bootloader using a windows 7 disk, but will this erase the data that was on the windows partition? If it does, is there any way to recover that data?

link|improve this question
2  
This is not a programming question. – soandos May 12 '11 at 19:07
feedback

migrated from stackoverflow.com May 12 '11 at 19:21

This question came from our site for professional and enthusiast programmers.

3 Answers

Your best bet it to insert the Windows 7 installation disk and boot from it, then click "Startup Repair". That usually works 99% of the time. (You won't lose any data or anything like that)

link|improve this answer
1  
Yes this should work. If you don't have a windows 7 disk there are a couple of stripped startup repair cd/dvds floating about that don't actually contain the entire OS so they are freely distributed. – aking1012 May 12 '11 at 19:31
feedback

Insert your Windows 7 CD and choose Command Prompt or Recovery Console - I can't remember which one.

At the command prompt, enter the following:

bootrec.exe /FixMbr

That should then restore your Master Boot Record, and allow the computer to boot into Windows.

link|improve this answer
feedback

Super Grub Disk can fix MBRs. It's my choice for these scenarios mainly because I don't know DOS commands but I do know *nix ones.

It's also free software.

link|improve this answer
feedback

Your Answer

 
or
required, but never shown

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