grub errors and read-only

Ken Moffat ken at kenmoffat.uklinux.net
Sat Aug 6 06:22:03 PDT 2005


On Sat, 6 Aug 2005, Donal Farrell wrote:

> I tried copying EVERYTHING from SuSE's /boot (except the grub folder)
> into FC4's /boot. I am certain SuSE is on a reiser fs and FC4 is on
> ext3 (shouldn't there at least be reiserfs in FC4 at this stage). I
> take it ext3 has problems with reiserfs and therefore tried to mount
> suse on  an ext2 fs.

 Everything else has problems with reiserfs! Ditto ALL other
filesystems.  A kernel can only mount filesystems it knows about.  What
you showed yesterday (trying to boot the ext3 on hda2 and treating it as
ext2) shows that the kernel has ext2 compiled into it.  Everything else
is a module, and loaded from the initrd. [ It helps distros fit
the proverbial quart into the pint pot.  As LFS users, we reserve our
pint pots for good ale. ]

 I think you are rushing ahead, floundering a bit (that's normal in
disaster recovery - things are usually not quite as we expect), and
liable to make things worse.  You need a cool head to get this all
working again.

> The kernel panic bit shows that it is trying to
> kill init. The initrd it uses I'm not sure. There are several in the
> SuSE /boot (now in FC4). I googled for the default fstab and menu.lst
> options for SuSE9.1
>
> title suse-2.6.4
> root (hd0,(x-1))
> kernel /boot/vmlinuz-2.6.4-52-default root=/dev/hda(x) vga=0x31a
> splash=silent desktop resume=/dev/hda(y) showopts ro
> initrd (hd0,(x-1))/boot/initrd
>

 The 'x' and 'y' are obviously numeric variables, probably set up by
their installer.  The important line is the last one:

initrd (hd0,?)/boot/initrd

 You are going to use grub from the fedora install, which has placed its
kernels in /boot/ on hda2 [ check that, let me know if you disagree ].
I assume that means grub will find the files in the /boot directory at
 hd(0,1)/boot/ : I'm assuming their is at least one fedora initrd of
some sort there.

 So if you mount Suse at /mnt, copy the Suse initrd from
/mnt/boot/initrd to /boot/initrd-suse then for the suse grub entry use

initrd (hd0,1)/boot/initrd-suse

 I know you've already copied everything over, but I'm concerned that
you keep the fedora and Suse initrds with different names - they are
most unlikely to work with the other's kernel.

> Mine is totally different at the moment, so I'll try point it to a
> 2.6.4-52_smp kernel and the corresponding initrd. By the way, the suse
> kernel did get past the stage of setting up disks, io, etc. before
> kicking out with the panic message
>

 You might still want to try booting with init=/bin/bash added to the
options for the Suse system.  At this point you are trying to debug what
is going wrong, and in particular whose filesystem do you end up
booting?  'init=/bin/bash' cuts out a whole chunk of linkage and
bootscript problems to let you look around a read-only root filesystem.

 Different distros boot things differently.  As someone who has had all
manner of weird boot problems, I know that the messages produced by
initscripts can sometimes mislead.

Ken
-- 
 das eine Mal als Tragödie, das andere Mal als Farce




More information about the blfs-support mailing list