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

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?

share|improve this question

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

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

2  
This is not a programming question. – soandos May 12 '11 at 19:07

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)

share|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. – RobotHumans May 12 '11 at 19:31

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.

share|improve this answer

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.

share|improve this answer

You must log in to answer this question.

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