[Techtalk] Re: I lost my filessystem

Conor Daly conor.daly at oceanfree.net
Tue Apr 15 23:58:55 EST 2003


On Tue, Apr 15, 2003 at 09:22:42AM -0700 or so it is rumoured hereabouts, 
Carla Schroder thought:
> On Tuesday 15 April 2003 4:27 am, Conor Daly wrote:
> > Hanlie said:
> > > The first command went fine - it found the root. But it couldn't find any
> > > vmlinuz* files. I found this strange because when I boot into rescue
> > > mode, I can see the system loading a vmlinuz file. I got the vmlinuz
> > > version from the GRUB commands (vmlinuz-2.4.18-14) and tried it directly
> > > (without using tab-completion), but it still didin't work. I got "Error
> > > 15: File not found", so I couldn't go ahead with this solution.
> >
> > What is /dev/hdb1?  Is it a small /boot partition?  If so, that's where
> > your vmlinuz is.  I'm not sure how to tell grub that vmlinuz is in a
> > partition other than the root partition.  Carla?  
> >
> > root(hd1,0)?  
> > kernel (hd1,0)/vmlinuz... root=/dev/hdb2?
> 
> If it's not finding vmlinuz on the hard drive, then it's 
> missing or damaged.

Or if /boot is mounted from a seperate partition.

> Tab completion will find all kernels, no matter how many 
> partitions and kernels there are.

As I understand it, GRUB (which I don't know well enough to be sure) tab
completion will see only those kernels that are in the partition it has
just mounted via the root() command.  If the kernels are in a seperate
partition (eg /dev/hdb1 = (hd1,0)) and you use root(hd1,1), GRUB won't see
the kernel.

> The only other thing I can think is 
> double-check the root values, remember if
> 
> root(hd1,1)
> 
> then on this line it uses fdisk numbering:
> 
> kernel /boot/vmlinuz-2.4.19 root=/dev/hdb2

>From my understanding of the process, the above is valid only if the
kernel in /boot is in the same physical filesystem as the root device.  If
it's in a seperate partition, then _that_ partition needs to be accessed
by GRUB.

Let me just review the seperate partitions thing:

o RedHat (and other) installers will usually suggest a small /boot
  partition (eg. /dev/hdb1) as well as the main / partition (eg. /dev/hdb2)
o This partition gets mounted under /boot
o The "boot" directory exists _only_ in the filesystem on /dev/hdb2
o A file "/boot/foo" exists _only_ in the filesystem on /dev/hdb1
o This file exists as /dev/hdb1/foo, _not_ as /dev/hdb1/boot/foo.

GRUB does not know about the mount order of filesystems so it won't know
to mount /dev/hdb1 under /boot to go looking for /boot/vmlinuz...
Instead, it needs to mount the filesystem _containing_ the kernel and then
tell that _kernel_ where the system's root is.

In this configuration, the GRUB commands should be:

root(hd1,0)
# to access and mount the /boot partition containing the kernels

kernel /vmlinuz-2.4.19 ro root=/dev/hdb2
# vmlinuz... is in the _root_ of the /boot partition so you leave out the
# /boot bit.
 
Hanlie, can you post your /etc/fstab and the output of 'fdisk -l' so we
can see what your partitions look like.  

> Gaah, this is frustrating, I never did like remote diagnosis!

:-)

Conor
-- 
Conor Daly <conor.daly at oceanfree.net>

Domestic Sysadmin :-)
---------------------
Faenor.cod.ie
 11:31pm  up 26 days,  5:07,  0 users,  load average: 0.00, 0.00, 0.00
Hobbiton.cod.ie
 11:30pm  up 26 days,  5:06,  1 user,  load average: 0.24, 0.08, 0.02


More information about the Techtalk mailing list