LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   grub wont boot windows on second hard drive (https://www.linuxquestions.org/questions/linux-general-1/grub-wont-boot-windows-on-second-hard-drive-182662/)

ryan00davis 05-17-2004 07:42 PM

grub wont boot windows on second hard drive
 
i have fedora core 2 on hard drive one (core 2 because 1 doesnt work with my video card), and i have windows xp pro on the second hard drive. when i start the computer, grub runs and i can pick fedora, and it runs no problem (that is what i am using right now), but when i click the windows one, it says that the selected device doesnt exist (i want to use windows because i am very new to linux so some things are still just easier for me in windows). i have tried many different configurations, different os on different drives, and stuff like that.
when i put grub into the mbr, it doesnt load, just says grub and doesnt load.

here is my /boot/grub/menu.lst :


# 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/hda2
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
color=red/blue blue/red
splashimage=(hd0,0)/grub/splash.xpm.gz
title Fedora Core
root (hd0,0)
kernel /vmlinuz-2.6.5-1.327 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.5-1.327.img
title Windows XP
map (0) (1)
map (1) (0)
rootnoverify (hd1,0)
chainloader +1
makeactive
boot


i have tried changing around the information under "title Windows XP," tried doing different things found on this forum, and other things found throught google, and just tried messing around with it myself with no luck.

if anybody can help me with my problem that would be appreciated.
thanks in advance
Ryan Davis

qwijibow 05-17-2004 08:05 PM

my grub boots XP and the config is exactly the same except for the 2 map lines.. try commenting them out.

ryan00davis 05-17-2004 08:36 PM

i just tried that, no success, how did you go about installing your system, did you install windows when it was the main drive, and then just move that drive to secondary, or did you have fedora on the system first, or what?

thanks again
ryan

ryan00davis 05-17-2004 08:44 PM

oh, and one more thing, where did you install grub, on the mbr?

Bambino 05-18-2004 04:09 AM

Hi,

First:
- shouldn't you use map (hd0) (hd1) instead of just (0) (1) or it that the same?
- You use rootnoverify on (hd1), but the after the mapping shouldn't it use hd0?

I have a similar problem. My setup is:
- I have Window XP installed on two Maxtox 80BG disk setup in RAID1 (mirror) mode. My motherboard supports this with the 2 HD connected on 2 separate connectors, i.e. not using the normal IDE
- To install Linux (fedora core) I installed a third HD on the primary IDE and this HD is configured in BIOS as the first to boot.

GRUB is installed to the MBR of this new HD. On startup I do get the menu to select Linux or Windows XP and it works fine to start Linux. But if I select Windows XP I end up in GRUB command mode. My grub.conf has this entry for Windows XP:

map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
chainloader --force +1
makeactive


If I then MANUALLY type the following commands in GRUB command mode, it will indeed boot my Windows XP:

rootnoverify (hd0,0)
chainloader --force +1
makeactive
boot

qwijibow 05-18-2004 04:27 AM

hmm,, it seems everyone who has windows as a master drive and linux as a slave drive has no problems,

however when windows is the slave..... people have problems.

try switching the jumpers in the back of your hard disks to make windows master, and linux slave.

then set the bios to boot of your slave hard disk (linux)

you will need to edit your grub.conf and /etc/fstab to let linux know where everything has moved to.

Bambino 05-18-2004 04:42 AM

No - that would not work. All 3 harddisks are configured as masters.

My 2 Maxtor 80GB HD used for RAID 1 (mirror) has to be set up both as masters. This is for the RAID to work. Keep in mind these are connected to separate ports on the motherboard.

The extra HD used for Linux and GRUB is indeed also jumpered as master. This is the only HD on the IDE channels. In linux the devices are given these names

/dev/hda = My additional HD with Linux
/dev/hde = Primary RAID drive (Windows XP)
/dev/hdg = Secondary RAID drive (Windows XP)

The XP drives only have 1 partition

qwijibow 05-18-2004 05:25 AM

ahh, didnt realse we were talking RAID.
does this make any difference to grub ?

ive never used raid, sorry, im lost.

ryan00davis 05-18-2004 02:30 PM

banbino, i tried what you told me to do and it again said that the selected device does not exist

ryan00davis 05-18-2004 02:41 PM

for those who have windows on the first drive, where do you install grub, i would assume on the mbr, if thats so, can anyone explain why when i try that it wont load grub, when you restart it just says grub and does nothing

Bambino 05-18-2004 05:52 PM

My settings are:

The primary IDE has only one HD and this is configured master. This HD has Linux installed and I installed GRUB in the MBR of this disk.

Then I also have my Windows XP on 2 HD in RAID 1 which are using a dedicated separate channel on the motherboard. These 2 are also configured as masters (both of them) required by the RAID controller onboard. I assume I would have the same problem if this was on a normal slave HD.

When I boot on the HD with Linux and GRUB, I get the GRUB menu and I can boot Linux without problems. In this situation hd0 is my Linux drive and hd1 is my Windows drive. If I select to boot windows, my grub commands are:

map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
chainloader --force +1
makeactive
boot

But this will NOT boot Windows. Instead I get a commandline GRUB and apparantly the hd0 and hd1 are swapped around. If I then MANUALLY type the commands:

rootnoverify (hd0,0)
chainloader +1 (now it works without the --force!)
makeactive
boot

This will boot my Windows correctly.

But....: I cant make it do it automatically...

I guess my problem is similar to the rest of you guys having problems to boot Windows XP on a non-first drive. I would appreciate any help you can give :)

NB: I know there are ways around it like changing the Windows drive as the boot drive, and setting up MBR of this drive to boot the linux drive. But I would still like to find a solution the current configuration having Linux on the primary master and from this drive boot my Windows.

ryan00davis 05-19-2004 02:24 AM

ok, ive decided my problem is more in that grub wont install in the mbr, is seems like a lot of people are having problems having windows on second hard drive, but i havnt heard of anybody who cant install grub on the mbr with linux on the second hard drive, does anybody know anything about this? and can i maybe try installing lilo,? if so where can i get it, and how would i go about installing it?

ryan00davis 05-19-2004 02:13 PM

ok, i feel a little stupid, i decided last night that it had to be a problem in my bios, so i upgraded the bios, and it didnt do me any good, then i tried reinstalling the software for my second hard drive, still no good, then eventually i looked in the setup of the bios, and the primary slave drive was turned off. i set it to auto and now everything works as it should. i had assumed it was on because the i could use it through windows, but i guess you cant boot from it. thank you everybody for trying to help me out.
ryan davis


All times are GMT -5. The time now is 06:56 PM.