# Solved: Dual boot Ubunto & XP on separate hard drives



## Firem4nJoe (Mar 11, 2011)

It's an old question but with new factors involved (sort of)

The last time I played with Ubuntu was back when 2GB was largest USB thumb drive available and I learned nothing useful back then. Now we're up to Ubuntu 10.10 and I'm not about to pay for Vista so I wiped my 320GB storage drive so as to not affect XP (Pro SP3) on my 80GB drive. I then installed Ubuntu on the 320 with no problems. 

Except for one. Me being of the old school Windows train of thought I assumed that having both drives set as master would give the option to choose which to boot from at start up. In hindsight I was quite obviously wrong. At the moment I'm achieving my goal by unplugging the drive I don't want to boot from.

I've found a great many out of date two HDD dual boot instructions that are useless to me thanks to the latest versions of Ubuntu using Grub2, and a great many more up to date but equally useless single HDD multi partition boot options.

Being an Ubuntu noob I would greatly appreciate any idiot proof step by step advice/instruction on how to achieve dual boot with the two drive method. 

Both drives are PATA/IDE on an Abit SG-72 board.

Thanks.


----------



## Firem4nJoe (Mar 11, 2011)

Ok so it turns out that A: I'm impatient and B: Setting the XP drive as Slave and then installing (reinstalling in my case) Ubuntu on the Master allows the Grub thing to work its magic and list XP as a boot option at start up. I'm glad you could help me Google


----------



## TerryNet (Mar 23, 2005)

You're welcome.   I think it would have been possible to get the dual boot working w/o a reinstall, but would have been more difficult and taken more time. 

You can mark this solved using the







button at the upper left of the page.


----------



## saikee (Jun 11, 2004)

I have written a thread of dual booting Windows and Linux while keep Windows untouched like a virgin. It is in my signature.

The thread was written for Grub1 but Grub2 can do it too just as easy.

Grub can be asked to switch the hard disk order (0 or 1) on-the-fly. The hard disks are still physically fixed as Master and slave but Grub just swap the order when the info is given to the Linux kernel.

Xp only boots to the disk it was originally installed and that should be the master or disk 0.

So the arrangement should be

(1) Xp originally booted as the only hard disk so it would be disk 0

(2) When Ubuntu is installed have its disk as master and the xp disk as slave and freeze the arrangement.

(3) Ubuntu will boot OK but to boot Xp just make sure the instruction in /boot/grub/grub.cfg has these statements

```
menuentry 'Xp installed in Master disk (hd0) now boot as a slave (hd1)' {
set root=(hd1,1)
[COLOR="Red"]drivemap (hd0) (hd1)
drivemap (hd1) (hd0)[/COLOR]
chainloader +1
}
```
The two drivemap statements swaps the master and slave disk order on-the-fly. The swap is only temporary for the Ubuntu session and the hard disk order reverts back to the original as soon as Ubuntu exits.


----------



## Firem4nJoe (Mar 11, 2011)

Thanks guys,

Now I know for next time


----------

