Re: [RFC PATCH] /sys/block -> /sys/class/block (Fedora 3 & 4 testers wanted)

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Greg:

A while back you asked whether Kay's block-device patch would work 
under FC3 or FC4.  I've got an old FC4 system; the normal kernel-update 
procedure hasn't worked on it for some time.  (I don't remember exactly 
when it stopped working.)

Not for any sinister reason.  The underlying problem seems to be that
the nash script or the nash executable in the initramfs image created
by RedHat's mkinitrd program in FC4 has a few errors.  In particular,
the "--movedev" option to the switchroot command doesn't work right.

On the other hand, I customized that script for myself last year (only
a few changes were needed) and have had no problems booting any kernel
up to and including your current development tree.

For the record, here is the script as created by FC4's last official 
update:

#!/bin/nash

mount -t proc /proc /proc
setquiet
echo Mounted /proc filesystem
echo Mounting sysfs
mount -t sysfs /sys /sys
echo Creating /dev
mount -o mode=0755 -t tmpfs /dev /dev
mknod /dev/console c 5 1
mknod /dev/null c 1 3
mknod /dev/zero c 1 5
mkdir /dev/pts
mkdir /dev/shm
echo Starting udev
/sbin/udevstart
echo -n "/sbin/hotplug" > /proc/sys/kernel/hotplug
echo "Loading jbd.ko module"
insmod /lib/jbd.ko 
echo "Loading ext3.ko module"
insmod /lib/ext3.ko 
/sbin/udevstart
echo Creating root device
mkrootdev /dev/root
echo Mounting root filesystem
mount -o defaults --ro -t ext3 /dev/root /sysroot
echo Switching to new root
switchroot --movedev /sysroot

Don't ask me why udevstart is called twice -- it works okay under FC4's 
2.6.17 kernel.

Here is the diff for my customized version:

--- norm/init   2007-06-03 14:02:58.000000000 -0400
+++ test/init   2007-06-03 14:01:13.000000000 -0400
@@ -22,7 +22,10 @@
 /sbin/udevstart
 echo Creating root device
 mkrootdev /dev/root
+umount /sys
 echo Mounting root filesystem
 mount -o defaults --ro -t ext3 /dev/root /sysroot
+mount -t tmpfs --bind /dev /sysroot/dev
 echo Switching to new root
-switchroot --movedev /sysroot
+switchroot /sysroot
+umount /initrd/dev

In all honesty, I should mention that the versions of nash and udev in
my customized initramfs image aren't the same as the ones in the FC4
image.  They are derived from FC6; in fact I use the same initramfs
image for testing new kernels under both FC4 and FC6.  Also the
contents of etc/udev/udev.conf differ in the two images.

Alan Stern

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

[Index of Archives]     [Kernel Newbies]     [Netfilter]     [Bugtraq]     [Photo]     [Stuff]     [Gimp]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Video 4 Linux]     [Linux for the blind]     [Linux Resources]
  Powered by Linux