LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   XP/RH7.3 dual boot to grub> (https://www.linuxquestions.org/questions/linux-software-2/xp-rh7-3-dual-boot-to-grub-29944/)

awdoyle 09-09-2002 03:11 AM

XP/RH7.3 dual boot to grub>
 
I know there's a ton of info here on dual boots, grub, and lilo, but I've been sifting through it and I'm stumped. I even tried reading the info page on GRUB.
I installed XP (fat32/30gb) first, then RH 7.3 (ext2/30gb), putting GRUB on the first sector of the boot partition. The XP manager took over, not offering a dual boot option. The only way into RH was via boot floppy. I tried copying the bootsect.lin file with command:
# dd if=/dev/hda3 bs=512 count=1 of=/mnt/bootsect.lin
Placing the command in C:\ with the appropriate line in my boot.ini file gave me the option to boot to RH, but choosing the option gave me a blinking cursor. I logged in as root and ran:
# grub-install --root-directory=/boot /dev/hda
This caused the box to boot to a grub> prompt. When running command:
# find /boot/grub/stage1 (or stage2)
both are found on hd0,1. Running
# setup (hd0)
completes successfully, but I still boot to a grub> prompt. At this point I'm considering wiping the drive and starting from scratch. Problem is I've done that a couple times without being any more successful :-/ On my last drive it worked, which is wierd. I've included a bit of information below, just in case it's helpful. Is there anything I can do to enable the grub menu, or any boot-manager menu?
Many thanks for any suggestions you can offer!
:study:
Andrew
P.S. Please let me know if I can give other information.

Partition table:
hda1=xp hda2=/boot hda3=/root hda4=extended hda5=swap

Hardware:
WD 80gb IDE, ASUS A7M266 mobo, 256mb ram, geforce2 gtx 32mb, tdk cd-rw, Intel dsl/pro ethernet, Sylvania f92 19" monitor

file:/boot/grub/device.map:
(fd0) /dev/fd0
(hd0) /dev/hda

file:/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,1)
# kernel /vmlinuz-version ro root=/dev/hda3
# initrd /initrd-version.img
#boot=/dev/hda2
default=1
timeout=10
splashimage=(hd0,1)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-3)
root (hd0,1)
kernel /vmlinuz-2.4.18-3 ro root=/dev/hda3 hdc=ide-scsi
initrd /initrd-2.4.18-3.img
title Windows XP
rootnoverify (hd0,0)
chainloader +1

awdoyle 09-10-2002 03:44 AM

I did some more RTFMing and I have an update! On RedHat's GRUB page there is further explanation of the way GRUB functions. Now when booting to the grub> prompt, if I enter:
chainloader (hd0,0)+1
boot
I'm able to boot to XP. However, I still don't know how to enable the GRUB menu, so I can just boot to it. It mentions:
Quote:

If the configuration file cannot be found, or if the configuration file is unreadable, GRUB will load the command line interface to allow users to manually type the commands necessary to boot an operating system.
If the config file is unreadable or damaged, it'll give an error, and it doesn't with me. I'm not sure if it's unfindable.
Does anyone know how to enable that menu?

Thanks!
Andrew

Faecal 09-10-2002 11:27 AM

I had this exact issue at one point with 7.2.

The problem was with the --root-directory=/boot part - grub was failing to find the config file. I think that simply leaving out the root-directory part (or perhaps it was setting it to /) solved the problem.

jglen490 09-10-2002 02:06 PM

Quote:

putting GRUB on the first sector of the boot partition. The XP manager took over, not offering a dual boot option.
And therein lies the rub. Had you put Grub on the MBR instead of your Linux boot sector, all would have worked. Now you need to make a decision: use ntldr as your boot manager for both, or re-install and reconfigure Grub.

Go here for ntldr info:

http://www.linuxdoc.org/HOWTO/mini/Linux+NT-Loader.html

or go here for Grub info:

http://www.gnu.org/manual/grub-0.92/html_mono/grub.html

Amerist 09-10-2002 03:46 PM

I dual boot Red Hat and XP. I Already had XP installed on a 15GB drive and I installed Red Hat on a seperate 10GB drive. This should not make any difference from a logical standpoint, but I included this information for information's sake.

When Installing RH 7.3 from a CD I was given the options of which bootloader I would like to use and on which portion of the disk it should be written. I chose GRUB as my boot loader, chose to have GRUB installed on the MBR, and At this point I had to click on the Windows partition (which in my system is /hda) and I gave it a label of "Windows XP Professional" then I chose to set this drive as the primary booting partition (since I want GRUB to automatically boot me into Windows if I don't choose anything from the menu) and everything from there on continued as usual.

When my system boots, I am greeted with the GRUB menu and Windows XP is selected, but there is an option to boot into Red Hat Linux. Everything works fine. Email me if you have questions.

jglen490 09-10-2002 04:04 PM

It is an incredibly easy process, if you take your time to look at what you are doing -- and then just do it!!

Faecal 09-10-2002 04:45 PM

jglen490 is correct, but you do not need to do anything so drastic as using the xp boot manager. I think perhaps jglen missed the part that the box is now booting to a grub> prompt. I believe that awdoyle is almost there, it's just that grub's failing to find the config file to display the menu. I'm convinced that losing the --root-directory argument will make grub play nice. But hey, just because it rolled over and worked for me when I did that doesn't mean that it will for you :-)

awdoyle 09-10-2002 11:43 PM

Faecal - thank you! I had a feeling I was close. By logging in as root and entering:
# grub-install /dev/hda
# shutdown -r now
in a shell session, I correctly rebooted to a grub menu. I guess it shows why I'm not a programmer, to not have figured out the --root-directory argument. :rolleyes:
Thank you again Faecal, and to all who offered help as well! If I can help to answer your questions, let me know ;-)
Andrew

Faecal 09-11-2002 05:04 AM

When I went through exactly the same process, I told myself after figuring it out that it had been good for me - I'd had to learn how to use the grub prompt rather than just the user friendly menu. Seems that it wasn't just me that failed to understand the manpage - maybe it could use a little rewording.


All times are GMT -5. The time now is 07:40 PM.