Dual Booting RAID0 Windows with Ubuntu

There is a bit of confusion out there on how to dual boot your system if you are using RAID 0 (software raid that comes with most motherboards nower days) and a Linux distribution that is on a single disk.

I mainly use windows for gaming and want the performance of my raid disks in windows. So here is what you need to do.

Firstly I unplug all my disks apart from the one I want to install my Linux on in my case Ubuntu and install on to the selected disk and install grub to this as well (I am a bit paranoid that I might trash the wrong drive you see). Then I connect all the disks back in again and make sure the machine boots from the BIOS to the Linux disk. Then I go in to the distro and edit the /boot/grub/menu.lst I then add the following lines to boot windows:

title Windows NT/2000/XP/Vista (loader1)
map (hd0,0) (hd1,0)
map (hd1,0) (hd0,0)
rootnoverify (hd1,0)
makeactive
chainloader +1

If you have a lot of disks you might want to add several options to boot into windows like this:

title Windows NT/2000/XP/Vista (loader2)
map (hd1,1) (hd2,1)
map (hd2,1) (hd1,1)
rootnoverify (hd2,1)
makeactive
chainloader +1

title Windows NT/2000/XP/Vista (loader3)
map (hd2,2) (hd3,2)
map (hd3,2) (hd2,2)
rootnoverify (hd3,2)
makeactive
chainloader +1

title Windows NT/2000/XP/Vista (loader4)
map (hd3,3) (hd4,3)
map (hd4,3) (hd3,3)
rootnoverify (hd4,3)
makeactive
chainloader +1

Once you know which loader works you can make a note and remove the excess code from the file.

This works for SATA as well as PATA drive. I have tried it with XP and vista and it works great.