[readonly/geninitrd/devel: 243/334] Fix passing hotplug binary into kernel. Drop devfs mount for lvm2.
draenog
draenog at pld-linux.org
Sat Nov 2 19:31:58 CET 2013
commit d152a29dd1263b596c6c0d3cece477870fced5ae
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date: Sat Sep 25 22:39:21 2004 +0000
Fix passing hotplug binary into kernel. Drop devfs mount for lvm2.
svn-id: @4657
geninitrd | 11 ++++-------
1 file changed, 4 insertions(+), 7 deletions(-)
---
diff --git a/geninitrd b/geninitrd
index 36dc963..3993b88 100755
--- a/geninitrd
+++ b/geninitrd
@@ -1056,6 +1056,7 @@ EOF
initrd_gen_udev() {
[ -n "$verbose" ] && echo "Setting up udev..."
mkdir -p $MNTIMAGE/sbin
+ mkdir -p $MNTIMAGE/proc
mkdir -p $MNTIMAGE/etc/udev
inst /sbin/initrd-udev $MNTIMAGE/sbin/udev
@@ -1077,9 +1078,11 @@ mkdir /dev/shm
EOF
fi
cat >> "$s" << EOF
+echo "mount -t proc none /proc"
echo Starting udev
/sbin/udevstart
echo -n "/sbin/hotplug" > /proc/sys/kernel/hotplug
+echo "umount /proc"
EOF
fi
}
@@ -1188,7 +1191,6 @@ initrd_gen_lvm() {
mkdir -p $MNTIMAGE/proc
mkdir -p $MNTIMAGE/newroot
echo "mount -t proc none /proc" >> "$s"
- echo "mount -t devfs none /dev" >> "$s"
echo "mount -t tmpfs none /tmp" >> "$s"
if [ "$LVMTOOLSVERSION" = "1" ] ; then
echo "lvm vgscan -T" >> "$s"
@@ -1212,6 +1214,7 @@ initrd_gen_lvm() {
echo "}" >> "$MNTIMAGE/etc/lvm.conf"
echo "LVM_SYSTEM_DIR=/tmp lvm vgscan --ignorelockingfailure" >> "$s"
echo "LVM_SYSTEM_DIR=/tmp lvm vgchange --ignorelockingfailure -a y $VGVOLUME" >> "$s"
+ echo "LVM_SYSTEM_DIR=/tmp lvm vgscan --ignorelockingfailure --mknodes" >> "$s"
# Find out major/minor
echo "majmin=\"\`LVM_SYSTEM_DIR=/tmp lvm lvdisplay --ignorelockingfailure -c $org_rootdev\`\"" >> "$s"
echo "majmin=\"\${majmin#*/}\"" >> "$s"
@@ -1222,13 +1225,7 @@ initrd_gen_lvm() {
echo "val=\$((256 * \$major + \$minor))" >> "$s"
echo "echo \$val > /proc/sys/kernel/real-root-dev" >> "$s"
echo "umount /tmp" >> "$s"
- echo "umount /dev" >> "$s"
echo "umount /proc" >> "$s"
-# echo "mount -n -o ro $org_rootdev /newroot" >> "$s"
-# echo "cd /newroot" >> "$s"
-# echo "pivot_root . initrd" >> "$s"
-# echo "[ -x /sbin/chroot ] && exec /sbin/chroot . /sbin/init -i < dev/console > dev/console 2>&1" >> "$s"
-# echo "exec /usr/sbin/chroot . /sbin/init -i < dev/console > dev/console 2>&1" >> "$s"
fi
}
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/398807324938659207036e520c0950a61ef50c11
More information about the pld-cvs-commit
mailing list