LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices

Reply
 
Search this Thread
Old 07-24-2002, 10:53 PM   #1
frozenicicle
LQ Newbie
 
Registered: Jul 2002
Location: Boston, MA
Distribution: RedHat 7.3, OpenBSD 3.0
Posts: 7

Rep: Reputation: 0
Question 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
 
Old 07-25-2002, 04:22 AM   #2
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
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)
 
Old 07-25-2002, 06:34 AM   #3
frozenicicle
LQ Newbie
 
Registered: Jul 2002
Location: Boston, MA
Distribution: RedHat 7.3, OpenBSD 3.0
Posts: 7

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

root (hd1,)
error 22: NO SUCH PARTITION
 
Old 07-25-2002, 06:35 AM   #4
frozenicicle
LQ Newbie
 
Registered: Jul 2002
Location: Boston, MA
Distribution: RedHat 7.3, OpenBSD 3.0
Posts: 7

Original Poster
Rep: Reputation: 0
sorry, that should have been:

root (hd1,0)
error 22: NO SUCH PARTITION
 
Old 07-25-2002, 05:17 PM   #5
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
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.
 
Old 07-25-2002, 08:22 PM   #6
frozenicicle
LQ Newbie
 
Registered: Jul 2002
Location: Boston, MA
Distribution: RedHat 7.3, OpenBSD 3.0
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 07-25-2002, 08:25 PM   #7
frozenicicle
LQ Newbie
 
Registered: Jul 2002
Location: Boston, MA
Distribution: RedHat 7.3, OpenBSD 3.0
Posts: 7

Original Poster
Rep: Reputation: 0
found fsisk. /dev/hdb printed: hdb4 as the only partition as well as the one listed as root.
 
Old 07-25-2002, 08:33 PM   #8
frozenicicle
LQ Newbie
 
Registered: Jul 2002
Location: Boston, MA
Distribution: RedHat 7.3, OpenBSD 3.0
Posts: 7

Original Poster
Rep: Reputation: 0
I tried altering grub.conf to read (hd1,4) but came up with the same negative results.
 
Old 07-25-2002, 10:47 PM   #9
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
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.
 
Old 07-26-2002, 08:17 AM   #10
frozenicicle
LQ Newbie
 
Registered: Jul 2002
Location: Boston, MA
Distribution: RedHat 7.3, OpenBSD 3.0
Posts: 7

Original Poster
Rep: Reputation: 0
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
 
Old 07-29-2002, 09:05 PM   #11
linuxcool
LQ Addict
 
Registered: Jun 2001
Posts: 1,183

Rep: Reputation: 47
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.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
OpenBSD pf.conf for home network linuxpyro *BSD 3 08-21-2005 07:01 AM
Missing grub.conf & other oddnesses JMCraig Fedora 10 02-25-2005 03:43 PM
create lilo.conf or grub.conf through commands newpenguin Linux - Software 1 11-28-2003 08:22 PM
lilo.conf and grub.conf no read access shanenin Linux - Software 1 10-02-2003 03:53 PM
lilo.conf and openbsd chens_83 *BSD 5 07-30-2002 07:30 PM


All times are GMT -5. The time now is 07:42 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration