dual boot Linux/xp

mosprovider

Member
Mar 29, 2002
89
0
0
Hey guys.. Im trying out what i am finding to be a hard combo..

I have two harddrives. A and B .. A has XP loaded and B has Linux loaded. I had to unplug A to install Linux on B other wise I was affraid it would some how damage my XP install. Now I have 2 operating systems to choose from but the only way I can boot up in either one is to chage the bios to boot from the drive. On the linux drive it shows which OS do you want to boot.. But XP is not there..

How can I boot up to a screen that gives me a choice of what to load.. Should I reinstall? with both drives in.. I just dont want to corrupt my XP drive..

thanks

V
 
Last edited:

drag

Elite Member
Jul 4, 2002
8,708
0
0
Na don't worry about your XP stuff. Just leave that ALONE. :) Having 2 HD's is the best way to do the dual boot thing.

Make the BIOS chose the linux HD to boot up with.

What you do to add a entry to the to boot-loader menu for your XP OS differs depending on what boot-loader you are using.

You have 2 types.

lilo and grub.

Lilo is a bit older and easier to configure for a first time user. Grub is MUCH more advanced and can do all sorts of tricks, but what we want is to dual boot so both loaders do it equally as well and that is pretty basic stuff.

The only crappy part is that if you mess up sometimes it ruins the bootloader and you have to use the Installation CD or a floppy boot disk to boot up to were you can fix the problem. You can usually fix the problem...

for lilo you can read this

It may seem complicated at first, but all you realy have to do is add a line like:

other=/dev/hda1
label=XP

to your /etc/lilo.conf file.
were other=what drive your windows partition is located.
That's it! Re-run "lilo" and that gives you the extra line for XP. (don't forget to re-run lilo or the changes won't get installed.

The only weird thing is that Linux doesn't do the C: D: E: drive crud. It does it like this.
/dev/hda = first IDE device(primary master)
/dev/hdb = 2nd ide device(primary slave)
/dev/hdc = 3rd IDE device(secondary master)
/dev/hdd = 4th IDE device(secondary slave)

(I say IDE device instead of Harddrive, because one of them could be your CDROM or mabye a tape drive or something if you have a IDE one.)

the for each partition for each harddrive you just add a number to the back of it.
Like /dev/hda2 for the 2 partition on the first harddrive or
/dev/hdd1 for the first partition on the 4th ide device.


GRUB is a bit different. Mine configuration file is located in /boot/grub/menu.lst
Sometimes it's /etc/grub.conf or /boot/grub.conf. Depending on the version. I think when redhat uses grub it's located in /etc/grub.conf

Just add the lines:
title XP
rootnoverify (hd0,0)
chainloader +1

I don't think you need to re-run grub-install or grub or anything like that.

The hd0,0 means the first harddrive and first partitions. This is "programmer" lingo. In programming zero is the first number, not one. Think binary.

So if you want it to think that XP is on the 2nd harddrive you have to put (hd1,0) instead.


So you see all you have to do is edit lilo.conf and rerun lilo if that is what your linux version uses, or edit the grub.conf/menu.lst file if Grub is what you use.

If your not sure check out the forums or mailing lists from your Linux version's website. This question gets asked over and over again so you aught to find a example Q/A somewhere specific for you distro.