Author: glen
Date: Tue Nov 17 10:30:56 2009
New Revision: 10977
Modified:
geninitrd/trunk/mod-lvm.sh
Log:
- LVM: rewrite /dev/mapper/sys-rootfs -> /dev/sys/rootfs
Modified: geninitrd/trunk/mod-lvm.sh
==============================================================================
--- geninitrd/trunk/mod-lvm.sh (original)
+++ geninitrd/trunk/mod-lvm.sh Tue Nov 17 10:30:56 2009
@@ -184,8 +184,20 @@
# parse rootdev from kernel commandline if it begins
with /
case "$ROOT" in
/*)
+
+ # rewrite /dev/mapper/sys-rootfs ->
/dev/sys/rootfs
+ case "$ROOT" in
+ /dev/mapper/*-*)
+ ROOT=${ROOT#/dev/mapper/}
+ local VG=${ROOT%%-*}
+ local LV=${ROOT#*-}
+ ROOT=/dev/$VG/$LV
+ ;;
+ esac
+
if [ "$ROOT" != "$ROOTDEV" ]; then
ROOTDEV=$ROOT
+
echo "LVM: Using 'root=$ROOTDEV' from
kernel commandline"
local tmp=${ROOTDEV#/dev/}
if [ "$tmp" != "$ROOTDEV" ]; then
_______________________________________________
pld-cvs-commit mailing list
[email protected]
http://lists.pld-linux.org/mailman/listinfo/pld-cvs-commit