DefinIT

Fixing your Windows Vista MBR

| 30/05/2007 | Tags: , ,

I recently installed Vista as a dual boot with my old XP installation, while I transferred things over and made sure I could do all I need to do with my new Vista install. It came to the point when I needed to remove XP and solely rely on Vista. Some might say that’s brave, others foolish, others still insane. Whatever your opinion, I needed the HD space and was having no problems with Vista, so I bit the bullet.

Dusting off Partition Magic I set it to remove the old XP partition, resize the new Vista partition, make sure the Vista partition was a Primary partition rather than a logical one, and then reboot into Vista.

The outcome of this is that I wrecked my boot. XP is gone. Vista is there and readable, but there is no boot. All this signalled a problem with the MBR (master boot record). No problem in XP, it’s a simple boot into the Recovery Console and a fixboot or fixmbr. Foolishly I expected the same simplicity for my Vista install. No. Niet. Nein. Non.

 After some serious digging I found this KB article 919529 which outlined the use of Bootsect.exe and BCDEdit.exe to restore your MBR after you’ve installed an older version of Windows. At least it showed me where the tools I needed are!

  1. Boot from your Vista DVD and click the Repair option. It’ll search for Vista installs and then give you an option of which one to repair. Try the automatic boot repair first, because you can really screw up your hard disk if you don’t know what you’re doing. If that doesn’t work, it’s likely that your MBR is bad or missing.
  2. Fire up the Command Prompt from the Repair screen.
  3. Try running “Bootrec /RebuildBcd
  4. I used Bootsect.exe to repair the Vista boot loader. Note that this tool is not on your Vista installation, but on your Vista DVD. To repair your MBR and restore the Vista Bootloader, use the following command: “d:\Boot\bootsect.exe /NT60 All
  5. Now you need to check that your bootmgr (think Boot.ini) has the correct entry in it for your OS(s). BCDEdit is located on your Vista install, so navigate there – mine is on my C drive. I used the following command to view it: “c:\Windows\System32\BCDEdit.exe /enum all /v
  6. For me, there were no issues with my Boot.ini, so I didn’t have to edit, delete or create any entries. This might not be the case for you, for help using BCDEdit, use BCDEdit.exe /? for the help menu

 Other reference:

http://technet2.microsoft.com/WindowsVista/en/library/08d64d13-4f45-4a05-bd86-c99211a93dd91033.mspx?mfr=true

http://support.microsoft.com/kb/927391