∞ diff -u /usr/sbin/lvm2create_initrd /usr/local/sbin/lvm2create_initrd
--- /usr/sbin/lvm2create_initrd 2014-08-26 23:57:01.279720506 +0400
+++ /usr/local/sbin/lvm2create_initrd 2014-08-27 00:21:46.270953995 +0400
@@ -59,7 +59,7 @@
BINFILES=${BINFILES:-"${LVM} `which bash` `which busybox` `which pivot_root`"}
BASICDEVICES=${BASICDEVICES:-"std consoleonly fd"}
BLOCKDEVICES=${BLOCKDEVICES:-"md hda hdb hdc hdd sda sdb sdc sdd"}
-MAKEDEV=${MAKEDEV:-"debian"}
+MAKEDEV=${MAKEDEV:-"gentoo"}
# Uncomment this if you want to disable automatic size detection
#INITRDSIZE=4096
@@ -185,12 +185,14 @@
# run a shell if we're passed lvm2rescue on commandline
grep lvm2rescue /proc/cmdline 1>/dev/null 2>&1
if [ $? -eq 0 ]; then
- $LVM vgchange --ignorelockingfailure -P -a y
+ lvm vgchange --ignorelockingfailure -P -a y
do_shell
else
- $LVM vgchange --ignorelockingfailure -a y
+ lvm vgchange --ignorelockingfailure -a y
fi
+lvm vgmknodes
+
echo "$PRE Mounting root filesystem $rootvol ro"
mkdir /rootvol
if ! mount -t auto -o ro $rootvol /rootvol; then
@@ -206,6 +208,7 @@
echo "$PRE Changing roots"
cd /rootvol
+mount -t devtmpfs none dev
if ! pivot_root . initrd ; then
echo "\t*FAILED PIVOT TO NEW ROOT*"
do_shell
@@ -250,6 +253,7 @@
shift
done
+INITRD=/boot/initrd-lvm2.gz
INITRD=${INITRD:-"/boot/initrd-lvm2-$VERSION.gz"}
echo "$cmd -- make LVM initial ram disk $INITRD"