Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problem setting up dual boot 1

Status
Not open for further replies.

zsfhaergta

Programmer
Oct 6, 2008
26
US
Hi,

I am trying to set up a dual boot system with Red Hat EL 5.2 and Windows XP Pro. I have a separate disk for each OS. Grub is on the same disk as redhat(the primary disk). I know that Windows is installed correctly because if I force a load on the secondary disk Windows loads correctly. However when I go through grub it doesn't seem to recognize the 2nd disk. I get:

rootnoverify (hd1,0)
chainloader +1

Which are simply instructions from the grub.conf file telling the system to boot from hd1, which points to /dev/hdb. How do I get grub to recognize /dev/hdb as the drive to load for Windows?

Here is my /boot/grub/device.map:

# this device map was generated by anaconda
(hd0) /dev/hda
(hd1) /dev/hdb

Here is my /boot/grub/grub.conf:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a /boot partition. This means that
# all kernel and initrd paths are relative to /boot/, eg.
# root (hd0,0)
# kernel /vmlinuz-version ro root=/dev/VolGroup00/LogVol00
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-92.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-92.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-92.el5.img
title Microsoft Windows XP
rootnoverify (hd1,0)
chainloader +1

Here is my fdisk -l:

Disk /dev/hda: 320.0 GB, 320072933376 bytes
255 heads, 63 sectors/track, 38913 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 13 104391 83 Linux
/dev/hda2 14 25509 204796620 83 Linux
/dev/hda3 25510 38913 107667630 8e Linux LVM

Disk /dev/hdb: 41.1 GB, 41110142976 bytes
255 heads, 63 sectors/track, 4998 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hdb1 * 1 4997 40138371 7 HPFS/NTFS

Any help would be great. Thanks!
 
Try commenting out the
Code:
hiddenmenu
line in grub.conf, so that the menu shows for the timeout=5 seconds,
then you might be able to arrow down to the line reading:
Microsoft Windows XP
hit enter and boot XP.

HTH :)
 
Geirendre,

Thanks, I tried that and received the same result...

I think the boot loader isn't able to figure out that (hd1) corresponsds to /dev/hdb which corresponds to the slave drive. I'm not familiar with grub commands, so how do I tell it this?
 
Where did you install the Windows boot loader. I seem to recall that Windows cannot install its boot loader on a slave drive, so Grub is not finding it on hd1.

I also recall that there are some fixes for dual booting on two separate spindles, but the easiest way was to put Windows on your primary drive and install Grub on the MBR of that drive. Linux should boot just fine from a slave drive.


pansophic
 
newbie here, but everything i have read said that it is easiest to have windows installed first on primary drive (C:).

then, if available load your flavor of linux onto a second hard drive. if only one drive, then grub would take care of loading everything needed after windows is installed.

i am in the process of doing just that (on D:) with Intrepid.

 
Thanks, I tried that and received the same result...
and what was the result?
Did you get to the menu?
Any errormessages when booting?
RedHat boots ok, but windows does not? is that it?
info info info....
 
try the following:

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

Ben

"If it works don't fix it! If it doesn't use a sledgehammer..."
 
The Windows bootloader can't boot from anything but the first drive. You have to fool Windows to think it's the primary drive.

Try:

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

If that doesn't work try changing it "root (hd0,0)". I can't remember exactly how to address it when using the map commands.
 
There might also be something helpful on this blog.


It's designed for the Asus eeePC, but one of the things you have to do with the smallest model eeePC is boot from a SD card. Many of the same principles as far as grub is concerned.

Hope it helps!

Ben
Windows isn't the answer; it's the question. NO is the answer.
 
Thanks guys, I was able to finally get the dual boot set up.

What I found is that Windows needs to be on the master drive in order to boot. This presented a difficulty when I installed windows first on primary w/out leaving space for the /boot partition.

The way around this is to boot to the slave drive with the /boot partition, and modifying the grub.conf file to contain:

title Microsoft Windows XP
rootnoverify (hd1,0)
map (hd1) (hd0)
map (hd0) (hd1)
chainloader +1
 
Yep, that's what I said in my post. Glad you got it working.[thumbsup2]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top