LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   grub.conf ?: RedHat 7.3 & OpenBSD 3.0 (https://www.linuxquestions.org/questions/linux-software-2/grub-conf-redhat-7-3-and-openbsd-3-0-a-26507/)

frozenicicle 07-24-2002 10:53 PM

grub.conf ?: RedHat 7.3 & OpenBSD 3.0
 
I have RedHat 7.3 installed on my 1st hard drive (master), and I installed OpenBSD 3.0 on my second hard drive (slave) and I need to know how to edit my grub.conf file in order to boot OpenBSD. I added an OpenBSD section that I found on the internet (see below), but what I have entered does not work. OpenBSD is installed in the default formation (wd1a is root). I'm guessing I need to know where my OpenBSD kernel is located, but how do I do that from Linux?

# 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
splashimage=(hd0,0)/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-5)
root (hd0,0)
kernel /vmlinuz-2.4.18-5 ro root=/dev/hda2 hdc=ide-scsi hdd=ide-scsi
initrd /initrd-2.4.18-5.img
title Red Hat Linux (2.4.18-3)
root (hd0,0)
kernel /vmlinuz-2.4.18-3 ro root=/dev/hda2 hdc=ide-scsi hdd=ide-scsi
initrd /initrd-2.4.18-3.img
title OpenBSD 3.0
root (hd0,0)
makeactive
chainloader +1

linuxcool 07-25-2002 04:22 AM

The line in bold print is referring to the primary master drive.

title OpenBSD 3.0
root (hd0,0)
makeactive
chainloader +1

Try changing it to:

root (hd1,0)

frozenicicle 07-25-2002 06:34 AM

when I changed the root line from (hd0,0) to (hd1,0) I got the following message:

root (hd1,)
error 22: NO SUCH PARTITION

frozenicicle 07-25-2002 06:35 AM

sorry, that should have been:

root (hd1,0)
error 22: NO SUCH PARTITION

linuxcool 07-25-2002 05:17 PM

In your first post, what does ' wd1a ' stand for? Is your second drive primary slave or secondary slave? There is a file /boot/grub/device.map that lists names that grub gives to the drives. Example:

fd0 fd0
hda hd0
hdb hd1

Could you post a copy of it? It doesn't give names to cdrom drives, because it doesn't consider them bootable.

There is one problem with using this file. If you added the drive after grub was installed, the drive won't be listed. You can add it yourself if you can figure out what it would be named. Or you could run
grub-install --recheck.

You might be able to figure out what it calls your drive and you can replace it in the ' root ' line. If you do figure it out, run fdisk -l /dev/hd?? and see what the partitions are. Then you can figure out which partition to use with the drive name.

Let's say you find that the drive is hd2 and the partition that looks most likely to be the OpenBSD partition is the first partition. Then this is what you would use: (hd2,0). I hope this helps.

frozenicicle 07-25-2002 08:22 PM

I ran grub-install --recheck and it caused device.map to read:
(fd0) /dev/fd0
(hd0) /dev/hda
(hd1) /dev/hdb
by adding the line (hd1) /dev/hdb. I tried to run fdisk, but I got a command not found message. Does RedHat have another utility that it uses?

Also, after I ran grub-install --recheck, it caused my computer to hang at "GRUB Loading stage2..." after I restarted. I had to use the RedHat install cd to upgrade the boot loader configurartion. Was there a step after grub-install that I missed?

Altering grub.conf to read (hd1,0) on the OpenBSD root line did't allow me to boot OpenBSD

frozenicicle 07-25-2002 08:25 PM

found fsisk. /dev/hdb printed: hdb4 as the only partition as well as the one listed as root.

frozenicicle 07-25-2002 08:33 PM

I tried altering grub.conf to read (hd1,4) but came up with the same negative results.

linuxcool 07-25-2002 10:47 PM

I don't know why your computer hung after running ' grub-install --recheck ' and then rebooting. I told someone else to use it and they had no problem. Maybe you might have to give the location where you want grub installed. I don't have the ' --recheck ' option for my grub. I have an old version of grub.

Running fdisk gave you only hdb1 and hdb4? Try hdb4.

hdb4 = (hd1,3)

You have to subtract 1 ( one ) from the partition number for grub.

root (hd1,3)
makeactive
chainloader +1

I hope it works this time.

frozenicicle 07-26-2002 08:17 AM

I ran fdisk on hdb4 and got the following message (as well as a "Warning: too many partitions (16, maximum is 8)" message:

Disk /dev/hdb4: 255 heads, 63 sectors, 522 cylinders
Units = cylinders of 16065 * 512 bytes

16 partitions:
# start end size fstype [fsize bsize cpg]
a: 1* 173 172* 4.2BSD 1024 8192 16
b: 174 823 650 swap
c: 1 8894 8894 unused 0 0
d: 824 996 173 4.2BSD 1024 8192 16
e: 997 1169 173 4.2BSD 1024 8192 16
g: 1170 3336 2167 4.2BSD 1024 8192 16
h: 3337 8894 5558 4.2BSD 1024 8192 16

I changed grub.conf to read (hd1,3) and it found OpenBSD and began to boot but spit out the following message and hung:

reading boot....
probing: pc0 com0 com1 com2 apm mem[639k 159M a20=on]
disk: hd0* hd1
>>OpenBSD/i386 BOOT 1.28
boot>
booting hd1a:bsd: 3698688+327680+773316+[136392+169862] = 0x5de91a start=0xe010000
20
entrypoint at 0x100020

linuxcool 07-29-2002 09:05 PM

I don't have OpenBSD, so I don't know what the message means. The only thing I can think of is something didn't go completely right with the install.


All times are GMT -5. The time now is 01:22 AM.