kernel panic with initrd

Gerd Knorr (kraxel@cs.tu-berlin.de)
Sun, 2 Jun 1996 15:04:43 +0200 (MET DST)


Hi !

There is a bug somewhere in the initrd stuff. Reproduceable by using the
following script as /linuxrc. Basically it does the following (it is a
part from a script which tries automatic root-fs detection):
- mount /proc
- mount the real root filesystem, checks for some files and umounts it
- sets the real root fs using /proc/sys/kernel/real-root-dev
- umounts /proc and continues boot.
Now the kernel reports succesfull mount of root-fs and succesfull umount
of the initrd. Next is a message from ll_rw_blk, telling someone tried to
read from block-device 00:00, followed by a ext2-panic becauce it can't
read a inode block (from 00:00 too).

Seems mounting the filesystem cauces the problem, accessing the root-fs
in a different way (fsck for example, check root fs *before* mounting it :-)
works without problems.

Gerd

---------------------------------------------------------------------
#!/bin/sh
PATH=/bin
TERM=linux
export PATH TERM

ROOT=/dev/sdb1
DEV=2065

mount -t proc hello /proc
mount -t ext2 $ROOT /mnt
test -d /mnt/proc -a -d /mnt/sbin -a -f /mnt/sbin/fstab
umount /mnt
echo $DEV > /proc/sys/kernel/real-root-dev
umount /proc
exit