Installing Windows on the second hard disk of a Linux machine

I recently upgraded the hardware of my old desktop PC, with the aim of providing the house with a new-ish Linux machine for watching movies and using the internet, and a Windows machine for writing music and playing (old) games. My plan was to use two hard disks: one for Linux, another for Windows, and choose which to use at boot time.

Normal procedure is to install Windows first, then install Linux into a spare partition on the same hard drive (Windows tends to overwrite any disk you put it on). But it's easier to get a Linux machine up and running, see what hardware you've got, and get a decent system without needing to go and find loads of old drivers. So I decided to install Linux first. I plugged in a drive for it as the Primary IDE drive, and installed Ubuntu Linux onto it.

Then, I unplugged the Linux drive, plugged the other drive in, and installed Windows 2000 onto the second drive (just to make sure Windows couldn't overwrite Linux). Got that working too.

Then I plugged the Linux drive in, as the first drive on the IDE cable; and the Windows disk as the second.

The trick then is to get grub (the Linux bootloader I'm using) to present you with both disks as options as boot time. There's a sample configuration in /boot/grub/menu.lst, but that didn't work for me: it looked like it was working, then just hung. I tried a couple of things, but nothing which worked.

Finally, I found this blog entry and used the configuration there. The trick is to make Windows think it's installed on the first disk on the IDE cable. I added this to the bottom of menu.lst:

title Windows 2000
rootnoverify (hd1,0)
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1

which does the trick! Now I get a working Windows 2000 option in my grub boot menu.

Comments

Bookmarked

I just bookmarked this post and will use it right away.. Thanx mate!

First of all, I didn't even

First of all, I didn't even know that this was possible to install windows on a Linux system. I was thinking about buying those cheap dell computer (the mini 9) for $200..but then I found out that it had a linux system

For me the only reason to do

For me the only reason to do that would be to play some games. And those can be run on some virtual machines so I don't really see why. Though I guess if you're developing something you might want to test it on every possible OS.

I've had trouble with games

I've had trouble with games on some VMs (also they're painfully slow). And I'm a developer, so need to test stuff in lots of OSes :)

Doing this by yourself is a

Doing this by yourself is a hassle. It's extremely difficult and delicate process. Thanks for the help but it still shouldn't be that complicated.

It is really a pain to do it

It is really a pain to do it without any tutorial and guidance. I was really shocked when I had to lost everything on my OS. Thanks for making the process little comfortable.

Trying Someday

Perhaps, I will need this information. I should try it someday. I like to be able to work with either Microsoft or Linux whenever I have to. I keep this information for me.

That is almost unbelievable

To be very true, I never think on that way because that is almost impossible thing to do for me. Even you go more advanced and installed windows and Linux Separately. Thanks for sharing such a good tip because it saves me a lot of time.

Just say thanks

In fact the main purpose I came to this blog is for backlink, but after reading your article I get useful information from here

windows

I think its good to have both installed, i'm a gamer, and its nice to be able to play games still without having to boxes. that's a cool solution, thanks for the info, i'll have to think about that at reload time.

How's The Performance

Good job man. Normally I do dual boot the other way, Windows first then Linux. This is an interesting set up.

Doesn't make any difference

Doesn't make any difference to performance (Linux is obviously faster), as you're just booting one or the other on the same hardware.

wow

First of all, I didn't even know that this was possible to install windows on a Linux system. I was thinking about buying those cheap dell computer (the mini 9) for $200..but then I found out that it had a linux system

gj

Installed Debian to dual boot with XP the other day. What was cool though, that when I installed GRUB to the MBR of the first drive, it auto detected XP and it shows it in the list.

Installing Linux after

Installing Linux after Windows has always worked well for me, and worked the same way you've described. But unfortunately Windows on top of Linux isn't such a pleasant experience, as Windows will trash the MBR and make it look as though it's the only OS on the disk.