LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   What should my grub.conf file say for Windows? (https://www.linuxquestions.org/questions/linux-software-2/what-should-my-grub-conf-file-say-for-windows-135921/)

EVO VIII Chris 01-18-2004 12:51 AM

What should my grub.conf file say for Windows?
 
I am SOOOO close to getting this system to dual boot right. Heres a quick rundown. I have a SCSI hard drive which has Windows 2003 Server on it and I have a IDE hard drive which has redhat 8.0 on it. My grub.conf file looks like this...

# 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/hda6
# initrd /initrd-version.img
#boot=/dev/hda
default=0
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux 8.0
root (hd0,0)
kernel /vmlinuz-2.4.18-14 ro root=LABEL=/
initrd /initrd-2.4.18-14.img
title Windows Server 2003
rootnoverify (hd1,0)
chainloader +1

You can see that the Windows section of it is clearly wrong and this HAS to be why Windows won't boot. It is saying that the rootnoverify is set at (hd1, 0) I am not exactly sure what those two things together mean aside from the partition of the hard drive but I know for a fact that none of Windows not even the MBR is on the hd0. It is on my SCSI drive which is what Linux would call sda if I am right. I am just wondering if anyone can help me edit that small Windows section of my grub file and then this thing should work. Is the rootnoverify asking where the MBR is or what? Currently right now it will boot up to the redhat screen which asks me which OS to boot but then when you select Windows it can't seem to find windows because obviously it is looking in the hd1 which is NOT where windows is.

Anyone able to help!?
Thanks
Chris

MasPreguntas 01-18-2004 02:04 AM

Look through this first. It should get you there. http://www.geocities.com/epark/linux...w2k-HOWTO.html

-MP

Ooops! This does not really cover the SCSI issue. It does explain some basics and gives an example.

EVO VIII Chris 01-18-2004 02:12 AM

I have gotten it to work with dual booting by editing the boot.ini file in windows and so that tutorial was actually something I had read before in the past. This uses the windows boot loader to ask you which OS to boot. I would preffer to use the redhat boot loader (you know that cool graphical screen that asks which OS to boot) but the only thing I am unclear on is how to setup the grub.conf file DOS (windows) section. By default it was saying rootnoverify (hd0, 0) which is immposible because that is NOT where the Windows MBR is. I am just wondering if anyone knows how to do this via the redhat (grub) boot loader? Thanks for the link though it still is helpful.

Chris

MasPreguntas 01-18-2004 02:18 AM

Have you checked at http://www.gnu.org/software/grub/manual/? I am interested in this problem, as I am going to help a co-worker install on a new seperate SCSI drive soon. I am taking a break until tomorrow, but will help you if you do not solve it yourself. I am sure that it in the docs somewhere. Good luck.

-MP

EVO VIII Chris 01-18-2004 02:34 AM

Oh wow you are the man! That page is EXTREMELY helpful. I will definatley let you know what I find. The major difficulty here is that Windows 2003 Server is on a SCSI drive and Redhat 8.0 is on a IDE. I will try this tonight and let you know what I find.

EVO VIII Chris 01-18-2004 03:51 AM

Ok so here is what my grub.conf file looks like after reading the GRUB manual on that link.

# 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/hda6
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-14)
root (hd0,0)
kernel /vmlinuz-2.4.18-14 ro root=LABEL=/
initrd /initrd-2.4.18-14.img
title Windows 2003 Server
map (hd0) (sd1)
map (sd1) (hd0)
rootnoverify (hd0, sd1)
makeactive
chainloader +1

As you can see I have the 2 OS's both there. Redhat Linux boots just fine. For anyone who is wondering my computer has a SCSI hard drive and a regular IDE. Redhat is installed on the IDE which you can see in the grub file is hd0. Windows 2003 Server is loaded on the SCSI hard drive which is sd1. (unless it is known as sda, im not actually sure how to find this out).

After reeading through the documentation it seems that you must have the map command specified because each of these OS's only knows how to boot from their own disk (i.e the first disk). The map command map command usese disk swapping. As you can see I have specified to swap the Linux drive (hd0) with the Windows drive (sd1). The rootnoverify didn't have much explanation all it mentions is that it is to set GRUB's root device to the partition. Well that doesn't make to much sense to me so I have set it to hd0 which is the Linux drive to the drive sd1 which is the SCSI drive. I have restarted the system and it prompts me for which OS to boot. Sure enough when I try and boot Windows it comes up with an error and it says this...


map (hd0) (sd1)

Error 23: error while parsing number

Now first let me state that I am not actually sure what Linux knows my SCSI drive as? When I was installing it saw it as sda I beleive but I don't remember for sure. So I don't know if it is sd0, sd1, sd1 or what. Maybe someone else can tell me?

I must say this is quite the learning experience. I know that none of this has to do with drivers or anything because Linux recognizes my LSI SCSI device controller just fine and so does windows. If anyone would care to chime in on this I would appreciate it alot. I am obviously doing something wrong but remember I am a total newbie to Linux. MasPreguntas you and I seem to be in the same boat here so hopefully we can both help each other out! I will definatley let you know what happens and if I get it working as I am working on this thing around the clock! Let me know what you think as well!

Chris Jumonville

EVO VIII Chris 01-18-2004 04:33 AM

YES! I have it figured out!!!!!!! After playing around with GRUB and reading the manual extensively I have found this.

Although the install software sees all SCSI drives starting with a sd GRUB does not. It sees all your hard drives no matter the type as hd0, hd1, hd2, and so on. This explains the parsing error with the sd prefix. So now this is what my grub.conf file says!

# 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/hda6
# initrd /initrd-version.img
#boot=/dev/hda
default=1
timeout=10
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-14)
root (hd0,0)
kernel /vmlinuz-2.4.18-14 ro root=LABEL=/
initrd /initrd-2.4.18-14.img
title Windows 2003 Server
rootnoverify (hd1, 0)
map (hd0) (hd1)
map (hd1) (hd0)
makeactive
chainloader +1

This is easily understandable now that I think about it. rootnoverify is set at hd1 partition 0. This would technically be my second hard drive (the SCSI one) because your counting starting from 0. Partition 0 would be the Windows MBR of that hard drive. As far as the mapping goes that is simple. The mapping just virtually swaps hd0 and hd1. I have this COMPLETELY figured out now and I am very pleased. I feel so much smarter after doing this as well. I was seriously jumping in my chair when this worked. Anyways if you need any help what so ever in doing this let me know. Just make sure whatever you do that Linux first recognizes your SCSI controller and drives otherwise you will be in a whole nother problem there. Thanks for giving me the link to that manual because that manual was the most helpful thing I have read yet, and feel free to message me if you need help!

Chris Jumonville


All times are GMT -5. The time now is 09:15 AM.