LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   grub questions.... (https://www.linuxquestions.org/questions/linux-software-2/grub-questions-75624/)

oubipaws 07-24-2003 06:01 PM

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

mrhyde 07-25-2003 07:03 AM

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.

oubipaws 07-25-2003 07:30 AM

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

acid_kewpie 07-25-2003 07:45 AM

if "fdisk -l" doesn't list hdb2 then it doesn't exist....

homestead1000 07-25-2003 10:24 AM

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?

oubipaws 07-25-2003 10:32 AM

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

homestead1000 07-25-2003 10:47 AM

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

Corin 07-25-2003 10:55 AM

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.

Corin 07-25-2003 11:08 AM

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.

oubipaws 07-25-2003 11:13 AM

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>

Corin 07-25-2003 11:43 AM

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.


All times are GMT -5. The time now is 10:39 PM.