Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I did something incredibly stupid. I was trying to fix some booting issues with Vista and XP (this was a dual boot system with both OSes installed), and followed some advice online rather blindly and uncritically and now am in this position.

Basically, the advice was to use mbrwiz to wipe the MBR and have Vista repair it. The steps I followed were:

Boot to Vista DVD and run at the command prompt:

MBRWiz /Wipe=MBR /DISK=0 /Result  
MBRWiz /Wipe=HEAD /DISK=0 /Result

And no, very stupidly I also didn't back up the MBR.

What this did, according to the documentation of MBRWiz was:

  • Firstly wipe out the MBR. Should be recoverable with Windows though (which I have tried to do)
  • Secondly wipe out the first 63 sectors of the first partition of the disk

What I've tried since:

  • testdisk (can only see a single "FAT32 partition", rather than the three partitions that used to be there)
  • bootrec /fixmbr (same as fixmbr. Claims it fixes things but then nothing boots)
  • Windows repair (can't seem to do anything)

I have most of my files backed up, so it's not catastrophic, but I am keen to restore my system to how it was. Any advice on how to recover from this?

share|improve this question
    
i don't think the /wipe=head hits the first 63 sectors of the first partition, i think it hits the first 63 sectors of the disk. 63 sectors * 512 bytes/sector = 32256 bytes, so that probably took out the MBR, partition table (part of the MBR), and first bits of the first partition, including the initial sections of it's filesystem. see en.wikipedia.org/wiki/Master_boot_record –  quack quixote Oct 16 '09 at 17:28
add comment

3 Answers

up vote 4 down vote accepted

Okay, I managed to fix this, so I figured I'd post the steps in case someone else gets in a similar situation.

Firstly, I determined the commands I ran overwrote the master boot record as well as the partition table. Nothing else was damaged.

The Windows repair process had written some odd data to the partition table. So I re-ran MBRWiz /Wipe=head and /Wipe=MBR to get back to zero.

After that I ran testdisk again. This time it accurately detected there was no partition at all. I had it run a deep scan and it found all the previous partitions, including the repair partition, XP and Vista.

After recreating the partitions (I did this simply by using the default settings from testdisk for the partitions it found automatically, and simply changed their status from "D" (deleted) to "P" (primary) or "*" (boot)) and seeing my data intact (huge relief!) I needed to make the partition bootable (since although I had marked the partition as bootable, it lacked the proper MBR).

To do this I booted from my Windows DVD. I ran fixmbr and fixboot - which although didn't make the system bootable, did allow the Windows DVD to see the operating system. I then ran the automated Windows Vista boot repair, which made some changes, and I then got a new error message. So, I ran it a second time, and voila, all fixed and I was back in Vista.

The only negative side-effect was I could not boot into XP anymore, but it turns out having the dual boot with XP was what was stopping me from updating Vista to SP2 or Windows 7. I got all my stuff off that partition, removed it, and I'm now running Windows 7 (running an upgrade, which worked flawlessly) with everything completely intact.

Thanks everyone for the help.

share|improve this answer
    
BTW testdisk looks very good –  bobobobo Apr 15 '10 at 6:19
add comment

Boot from the windows XP CD, press the "R" key in the setup in order to start the restoration console. Select your windows XP installation from the list, and enter the administrator password. Enter the command: "FIXMBR" (without the quotes) at the input prompt and confirm the next question with a "Y" (without the quotes). Use exit to restore the computer.

Source

share|improve this answer
    
He says he's using Vista, not XP. –  Chris Thompson Oct 16 '09 at 16:52
    
@Chris Thompson: it's a Vista/XP dual-boot system. –  quack quixote Oct 16 '09 at 17:00
    
unfortunately this will put XP's bootloader on MBR but won't by itself fix the partition head wipe. –  quack quixote Oct 16 '09 at 17:02
    
you can more easily fix vista afterwards. –  Phoshi Oct 16 '09 at 17:22
add comment

You could try reinstalling Vista. If it detects your existing install you should be able to install over the top of it to retain your existing settings.

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.