]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
- LVM: rewrite /dev/mapper/sys-rootfs -> /dev/sys/rootfs
authorElan Ruusamäe <glen@pld-linux.org>
Tue, 17 Nov 2009 09:30:56 +0000 (09:30 +0000)
committerElan Ruusamäe <glen@pld-linux.org>
Tue, 17 Nov 2009 09:30:56 +0000 (09:30 +0000)
svn-id: @10977

mod-lvm.sh

index 55fca8d919b70fe22bb8ef0f649ddfb44583a102..33cfb362c7171233df2724e92ce4cab58d10f0a9 100644 (file)
@@ -184,8 +184,20 @@ initrd_gen_lvm() {
                        # 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
This page took 0.35191 seconds and 4 git commands to generate.