How to fix a corrupt Windows Vista MBR when using a Rocketraid raid controller

 

Have you just written a linux grub to the MBR (Master Boot Record) of your Windows Vista disk?

If the disk is not connected to a raid controller then it is fairly straightforward to fix.
To do so boot the Windows Vista installation DVD and fix from the recovery menu.

I have four sata disks connected to a Rocketraid 2300 raid controller and configured for raid 10 and running Windows Vista. I was installing Debian linux on a stand alone disk in the same computer and accidentally wrote the grub to the MBR of my Vista installation.

In an attempt to recover I tried to repair the MBR from the recovery menu of the Vista installation disk. This would have worked if I was not using a raid controller. The steps I initially used are shown below.

1. Put the Windows Vista installation disk in the disk drive, and then start the computer.
2. Press a key when you are prompted.
3. Select a language etc and then click Next.
4. Click "Repair your computer".
5. Click the operating system that you want to repair, and then click Next.
6. I couldn't actually see an operating system displayed so I tried clicking on "Load driver" and loaded my raid controller drivers from CD. Despite loading the correct drivers I still couldn't see my operating system.
7. If you are lucky enough to see your operating system then In the System Recovery Options dialog box, click "Command Prompt".
8. Type Bootrec.exe /fixmbr, and then press ENTER, which should fix your MBR.

If this procedure doesn't work for you then you can follow the same process I did and load linux onto a spare disk in your computer not connected to the raid controller. I had two disks plugged directly into the motherboard and not controlled by a raid controller. If you are using a plug in raid controller then chances are you may have some spare disk connectors on your motherboard. If you haven't got a separate disk then either buy one or try booting from linux on a usb key. Using a Linux live CD won't work in this case because we need to download the Rocketraid linux drivers and install them, then reboot linux.

I installed Ubuntu onto my spare disk and ran fdisk -l. This showed my raid as four separate disks and not as a raided device. This was because I still hadn't installed the correct raid controller drivers. I downloaded the Ubuntu linux Rocketraid drivers from the High Point web site and unpacked and installed them. I then rebooted my computer as prompted.

When I ran fdisk -l again I could see one large raided device instead of the four smaller disks. Therefore the driver had installed correctly.

I then searched the web for the "ubuntu ms-sys" package. I downloaded and installed the my-sys package with the Ubuntu package manager. my-sys is the utility that I used to rebuild the Vista MBR. The documentation for my-sys only stated it worked with older versions of windows such as XP but I found it worked fine with Vista.

Now using fdisk -l again, find the device for your raid device such as /dev/sda.

Type the following command to fix the Vista MBR ensuring that you replace /dev/sda with your raid device file.

ms-sys -m /dev/sda

That is it, now you should be able to reboot into Windows Vista.