Wednesday, February 21, 2007

2 SATA Drives - Kubuntu and Windows XP

A few days ago I purchased another hard drive for my computer. A 160gig SATA drive (my main computer only has SATA connections for the hard drive data). I bought the extra drive so I could install Kubuntu Linux and keep windows on my current hard drive, and just have a dual boot system. Sounds easy enough.

I put in the second hard drive as the primary drive and moved Windows to the secondary drive. Inserted the Kubuntu CD and proceeded to install. The installer came up great and asked which drive I wanted to install Kubuntu to. I chose the new 160gig drive.

After the install (~20 minutes or so) I rebooted the computer. Straight into Kubuntu. Hmmm...I thought. Maybe just a GRUB reconfiguration. After poking around a bit I noticed that Kubuntu had installed to the 80gig drive where my Windows was. BUMMER!! Good thing I made all those backups!

Checking around a bit further, I found that what I could do was:
  1. Put the new 160gig disk as Primary
  2. Install WindowsXP
  3. Put the Kubuntu hard drive back as Primary
  4. Edit GRUB to tell it that there was another hard drive there with WindowsXP
Now it was time to just install Windows to the new 160gig drive since I had Kubuntu installed and running great. Unplugged the 80gig drive and plugged in the 160gig drive as Primary. The installer came up and said "No Disk Found". BUMMER!!! Now what?

Checking around, I found that, in order to install a fresh copy of Windows XP, using a SATA drive, you have to install it as a SCSI / RAID. Why? Dunno. In order to do this, you need to put the drivers on a floppy disk. I don't have a floppy drive on my main computer. Now what to do?

OK. I have an older computer running Windows 2K that does have a floppy drive. Hook the Win2K computer to the router and download the drivers and copy them to a floppy disk. Then I can put the floppy drive into my main computer to load the drivers during install of WindowsXP.

Great! It works! Windows is installing...now for the fun part. Does Kubuntu boot? Will Windows boot?

The computer restarted and I had just go ahead and boot to Kubuntu. Fired up a command prompt and started editing two files.

The first file was /boot/grub/menu.lst This file is a list for grub to tell it what is loaded and where. I added the following section

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

What this does is tell Grub that Windows is there. It is located actually at hd1. However, Windows is picky. It likes to be first, but fortunately, it's not that smart. We have to trick it into thinking it is actually the first OS to boot. That is what the map(hd0) (hd1) does.

Now for the real fun part. Can I restart the computer, boot into Windows and then restart and boot into Kubuntu with no problems.

Success!!!! It works!!!


No comments:

Post a Comment