LinuxQuestions.org
Visit Jeremy's Blog.
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-2003, 06:01 PM   #1
oubipaws
Member
 
Registered: Mar 2003
Location: Frederick, MD
Distribution: Dux Linux 1 / Gentoo 1.4
Posts: 77

Rep: Reputation: 15
grub questions....


I am trying to boot my hdb1 drive and here is my grub file but it says 'not found'

here is 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,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-14)
root (hd0,0)
kernel /vmlinuz-2.4.18-14 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.18-14.img
title Dux Linux Stable (2-4-21)
root (hd0,0)
kernel /bzImage root=/dev/hdb1
title Dux Linux Unstable (2-6test1)
root (hd0,0)
kernel /bzImage2 root=/dev/hdb1

Thanks for any help
 
Old 07-25-2003, 07:03 AM   #2
mrhyde
Member
 
Registered: Jul 2003
Location: Europe
Posts: 198

Rep: Reputation: 30
Can you list your /boot directory and print the contents so I can have a look at them, it looks like your configuration file is incorrect.
 
Old 07-25-2003, 07:30 AM   #3
oubipaws
Member
 
Registered: Mar 2003
Location: Frederick, MD
Distribution: Dux Linux 1 / Gentoo 1.4
Posts: 77

Original Poster
Rep: Reputation: 15
i'm at work... windows here.


I have red hat installed on /dev/hda1
I want to boot up my other distro on /dev/hdb1

I have a /boot in red hat on /dev/hdb2
but in gentoo... I only have /dev/hdb1 (thats the whole hard drive)

/dev/hdb1 is reiserfs
 
Old 07-25-2003, 07:45 AM   #4
acid_kewpie
Moderator
 
Registered: Jun 2001
Location: UK
Distribution: Gentoo, RHEL, Fedora, Centos
Posts: 43,417

Rep: Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975Reputation: 1975
if "fdisk -l" doesn't list hdb2 then it doesn't exist....
 
Old 07-25-2003, 10:24 AM   #5
homestead1000
Member
 
Registered: Jul 2003
Location: San Diego, CA USA
Distribution: RH 7x,8x,9x, RHE 3, Fedora Core1
Posts: 38

Rep: Reputation: 15
Here's what I'd do.

boot into the stock kernel and run "df -a" and look for the root partition "/". Check the Filesystem on the left hand side. Does it appear the same as in your grub.conf?
 
Old 07-25-2003, 10:32 AM   #6
oubipaws
Member
 
Registered: Mar 2003
Location: Frederick, MD
Distribution: Dux Linux 1 / Gentoo 1.4
Posts: 77

Original Poster
Rep: Reputation: 15
i can't boot into my second os.... I have been chroot'ing into it.

But it df -a in red hat, it shows me having /mnt/dux mounted as /dev/hdb1

I only want one partiton on that drive... I just want to be able to boot it up and my grub skills stink
 
Old 07-25-2003, 10:47 AM   #7
homestead1000
Member
 
Registered: Jul 2003
Location: San Diego, CA USA
Distribution: RH 7x,8x,9x, RHE 3, Fedora Core1
Posts: 38

Rep: Reputation: 15
Is your hd scsi or ide? I'm a little confused by the default kernel config

title Red Hat Linux (2.4.18-14)
root (hd0,0)
kernel /vmlinuz-2.4.18-14 ro root=LABEL=/ hdc=ide-scsi <--???
initrd /initrd-2.4.18-14.img
 
Old 07-25-2003, 10:55 AM   #8
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Re: grub questions....

Quote:
Originally posted by oubipaws
I am trying to boot my hdb1 drive and here is my grub file but it says 'not found'
What do you mean by trying to boot my hdb1 drive?

Do you mean that you are trying to boot a kernel located on the first partition of your 2nd IDE disk?

You should make your file a little tidier to see what you are doing.

Remember that each "title" line starts a new stanza/section.

# 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-14)
root (hd0,0)
kernel /vmlinuz-2.4.18-14 ro root=LABEL=/ hdc=ide-scsi
initrd /initrd-2.4.18-14.img
#------------------------------------
title Dux Linux Stable (2-4-21)
root (hd0,0)
kernel /bzImage root=/dev/hdb1
#------------------------------------
title Dux Linux Unstable (2-6test1)
root (hd0,0)
kernel /bzImage2 root=/dev/hdb1
#-------------------------------------


In each of the sections you have the line root(hd0,0).

That is a reference line used by grub for the location of its files and the location of the / specified on the kernel line.

Remember always that grub starts numbering from 0.

So root(hd0,0) means hd0 - disk 1, 0 - partition 1.
Assuming you have not SCSI disks, that means (hd0,0) references hda1.

So for each section you are saying look for kernel /image on hda1.

If your Dux Linux kernel images bzImage and bzImage2 are located
on partition 1 of disk 2, then you need to change the root specification to

root(hd1,0)

for each of the sections for Dux Linux kernel images.

To give another example -

If by preference you had a seperate boot partition on your 2nd ide disk,

eg your had /dev/hdb1 /
and /dev/hdb2 /boot
/dev/hdb3 /usr
etc etc

and your vmlinuz images were on /boot

then you would need to say

root(hd1,1)
kernel image=bzImage root=/dev/hdb2


Remember this and you will not go wrong in future --

0) grubs starts counting from 0

1) The root command specifies where grub looks for the kernel image to boot.

2) The kernel image needs to have the parameter root to identify the root file system to mount.
 
Old 07-25-2003, 11:08 AM   #9
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
Quote:
Originally posted by homestead1000
[B]Is your hd scsi or ide? I'm a little confused by the default kernel config[B]
As far as grub is concerned, it does not matter whether the disk is IDE or SCSI.

If the computer bios is set up so that IDE disks are booted/seen first (whether or not there are SCSI disks/devices present) then grub still starts counting from 0 for each disk in the order set by the motherboard BIOS.

So for 2 SCSI disks and 2 IDE disks.

(hd0,0) - partition 1 on 1st IDE disk hda
(hd1,0) - partition 1 on 2nd IDE disk hdb
(hd2,0) - partition 1 on 1st SCSI disk sda
(hd3,0) - parition 1 on 2nd SCSI disk sdb
etc

If the motherboard BIOS was setup to boot/see the SCSI disk/devices first then

(hd0,0) - partition 1 on 1st SCSI disk sda
(hd1,0) - partition 1 on 2nd SCSI disk sdb
(hd2,0) - partition 1 on 1st IDE disk hda
(hd3,0) - partition 1 on 2nd IDE disk hdb

And sometimes something appears as SCSI device which in fact has IDE disks on it.

If you have eg a Promise ATA card and you set the motherboard BIOS to boot from the first available SCSI device and you have a single disk on each IDE controller

(hd0,0) - partition 1 on 1st IDE disk on Promise 1st ide controller - hde
(hd1,0) - partition 1 on 2nd IDE disk on Promise 1st ide controller - hdg

I hope the examples help to clear up how grub counts the disks, regardless of whether they are IDE or SCSI and regardless of
whether they are IDE master or IDE slave.

Last edited by Corin; 07-25-2003 at 11:10 AM.
 
Old 07-25-2003, 11:13 AM   #10
oubipaws
Member
 
Registered: Mar 2003
Location: Frederick, MD
Distribution: Dux Linux 1 / Gentoo 1.4
Posts: 77

Original Poster
Rep: Reputation: 15
sorry guys... here is exactly what I want and what I have:

I have 2 IDE hard drives:
40 gig primary with red hat installed
/dev/hda1 = /
/dev/hda2 = /boot
/dev/hda3 = swap

20 gig slave drive:
/dev/hdb1 = /

I have everything working fine in red hat, but I want to configure grub to see Dux on the second hard drive.

I just wanted someone who knew their grub stuff to help me get my config file right.

Only thing is that I have /bzImage and /bzImage 2 on dux

Thanks for your help<edit> its working now, thanks</edit>

Last edited by oubipaws; 07-25-2003 at 11:15 AM.
 
Old 07-25-2003, 11:43 AM   #11
Corin
Member
 
Registered: Jul 2003
Location: Jette, Brussels Hoofstedelijk Gewest
Distribution: Debian sid, RedHat 9, Suse 8.2
Posts: 446

Rep: Reputation: 31
As you have two disks, make sure you have a look at

/usr/share/doc/HOWTO/Multi-Disk-HOWTO

to see how you can improve your disk performance by having for example /usr on one disk and /usr/lib on the other disk.
 
  


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
grub booting questions jiawj Red Hat 6 12-31-2004 05:54 AM
Questions about installing GRUB Seventh_Warrior Linux - Software 2 10-25-2004 09:38 PM
grub questions siegecraft4 Linux - Newbie 7 07-17-2004 10:56 PM
grub.conf questions taoweijia Red Hat 1 02-04-2004 08:27 AM
Grub Questions? veraMOB Linux - General 2 07-17-2003 04:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 04:58 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration