[readonly/geninitrd: 493/1068] - one more lvm.static - give admin chance to figure out problem at initrd
draenog
draenog at pld-linux.org
Sat Nov 2 19:53:50 CET 2013
commit e537bb5b404607cbec81167ac029f945a4ad660d
Author: Elan Ruusamäe <glen at pld-linux.org>
Date: Thu Nov 1 02:21:54 2007 +0000
- one more lvm.static
- give admin chance to figure out problem at initrd
svn-id: @8936
geninitrd | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/geninitrd b/geninitrd
index 20c8ceb..cacf8a4 100755
--- a/geninitrd
+++ b/geninitrd
@@ -1685,7 +1685,7 @@ initrd_gen_lvm() {
echo "$printk" > /proc/sys/kernel/printk
# Find out major/minor
- attrs="$(lvm lvdisplay --ignorelockingfailure -c $LVM_ROOTDEV 2>/dev/null)"
+ attrs="$(lvm.static lvdisplay --ignorelockingfailure -c $LVM_ROOTDEV 2>/dev/null)"
if [ "$attrs" ]; then
majmin="${attrs#*/}"
majmin="${majmin#*:*:*:*:*:*:*:*:*:*:*:*}"
@@ -1695,6 +1695,11 @@ initrd_gen_lvm() {
if [ "$major" -a "$minor" ]; then
# Pass it to kernel
echo $((256 * $major + $minor)) > /proc/sys/kernel/real-root-dev
+ else
+ echo 2>&1 "Error figuring out real root device for $LVM_ROOTDEV!"
+ echo 2>&1 "System will not most likely boot up! So dropping your to a shell!"
+ echo 2>&1 ""
+ sh
fi
EOF
fi
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/readonly/geninitrd.git/commitdiff/147754ca159d40ca5eb541074dc043d8cbd92090
More information about the pld-cvs-commit
mailing list