Monday, January 30, 2012

Adding a Windows HD to an Existing Linux Installation

So I got Duke Nukem forever for Christmas, and unforuntately there is no Linux version. Which, again unfortunately, means I need to add a small HD to my computer that will run Windows (XP Pro, which I have lying around still).

I found a cheap, 40G SATA HD at newegg.

To make Windows install easily, I physically unplugged the main HD which runs PCLOS, then went thru the standard WindowsXP install. When I was done, I plugged the main drive back in, and booted into Linux.

So now I needed to make a Grub entry for the Windows drive. Unfortunately, the standard Grub GUI provided with PCLOS will not work in this case, because the Windows drive is the second drive in the system, and stupid Windows needs to be on the first drive in order to function (stupid Bill Gates).

So, in this case, you need to edit /boot/grub/menu.lst manually, and add a secton, mapping hd1 to hd0 and hd0 to hd1 in order to trick Windows into think it's really on the first drive:

title DukeNukem
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
makeactive
chainloader +1
And done.

And now everything works, and I can boot into either Windows or PCLOS just fine.

Only problem now is that I'm all out of gum...