LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   dual boot (https://www.linuxquestions.org/questions/linux-general-1/dual-boot-397163/)

mfrangos79 12-28-2005 08:07 AM

dual boot
 
I have Linux/Debian installed on one hard disk,
and I have Windows/XP installed on another hard disk.

I connected both of them on the motherboard, and when the computer starts up,
'grub' shows just the Linux boot options (and they work ok).
How can I add windows on this boot list.. I know i have to add something
in /boot/grub/menu.lst but i dont know what...(the example in menu.lst adds
something on the boot list but doesn't load windows.. it just freezes).

I tried 'df' to check if I could see both hard disks info, but all
i could see was info for hda1 (linux). So i went in /ets/fstab and mounted the second hard drive(windows) .. and now i can see it (an its content) as /hdb1 ..but the problem is how do I boot windows??

Thank you for your help in advance!

cuiq 12-28-2005 09:51 AM

Your grub entry should read like this.

For Windows on primary hard drive;

title Windows XP
root (hd1,0)
makeactive
chainloader +1

or

For Windows on second (slave) hard drive;

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


Peace V:cool:

michapma 12-28-2005 11:33 AM

Quote:

Originally Posted by cuiq
Your grub entry should read like this.

For Windows on primary hard drive;

title Windows XP
root (hd1,0)
makeactive
chainloader +1

I'm pretty sure that should be

root (hd0,0)

...assuming that XP is on the first partition. If XP is not on a primary partition (it usually is), GRUB can't boot it. You can tell by executing fdisk -l (lowercase L). If XP is on hda1, hda2, hda3 or hda4 (or hdb), then it's on a primary partition.

cuiq 12-28-2005 12:12 PM

The reason for the (hd1,0) is because mfrangos79 made this statement.

Quote:

I tried 'df' to check if I could see both hard disks info, but all
i could see was info for hda1 (linux). So i went in /ets/fstab and mounted the second hard drive(windows) .. and now i can see it (an its content) as /hdb1 ..but the problem is how do I boot windows??
It's also why I added the "map" section in my post, which is what you want to do if windows is on the second hard drive hdd.

However you are quite correct that it should be (hd0,0) is windows is on the primary partition.

Peace V:cool:

mfrangos79 12-28-2005 12:37 PM

Thanks guys, cuiq is right
since Windows is on second (slave) hard drive I have tried the following and it works just fine!

Code:

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


mfrangos79 12-28-2005 12:37 PM

(Problem solved)


All times are GMT -5. The time now is 07:17 AM.