From 78b5f6beee0453dd938f1a3c6a6ab5776e6d78f3 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20B=C3=A4chler?= Date: Mon, 29 Jan 2007 20:45:25 +0000 Subject: fix 6038 --- rc.sysinit | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'rc.sysinit') diff --git a/rc.sysinit b/rc.sysinit index a9e4754..ea4ea9a 100755 --- a/rc.sysinit +++ b/rc.sysinit @@ -90,6 +90,7 @@ fi if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then if [ -x /sbin/lvm -a -d /sys/block ]; then # Kernel 2.6.x, LVM2 groups + /sbin/modprobe -q dm-mod 2>/dev/null stat_busy "Activating LVM2 groups" /sbin/lvm vgscan --ignorelockingfailure --mknodes >/dev/null /sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null @@ -103,6 +104,7 @@ fi # Set up non-root encrypted partition mappings if [ -f /etc/crypttab -a -n "$(grep -v ^# /etc/crypttab | grep -v ^$)" ]; then + /sbin/modprobe -q dm-mod 2>/dev/null stat_busy "Unlocking encrypted volumes:" csfailed=0 CS=/sbin/cryptsetup.static @@ -145,6 +147,13 @@ if [ -f /etc/crypttab -a -n "$(grep -v ^# /etc/crypttab | grep -v ^$)" ]; then else stat_fail fi + # Maybe someone has LVM on an encrypted block device + if [ "$USELVM" = "yes" -o "$USELVM" = "YES" ]; then + if [ -x /sbin/lvm -a -d /sys/block ]; then + /sbin/lvm vgscan --ignorelockingfailure --mknodes >/dev/null + /sbin/lvm vgchange --ignorelockingfailure -a y >/dev/null + fi + fi fi status "Mounting Root Read-only" /bin/mount -n -o remount,ro / -- cgit v1.2.3