]> git.pld-linux.org Git - projects/geninitrd.git/commitdiff
One more fallback for rootdev.
authorArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 28 Jun 2015 12:38:20 +0000 (14:38 +0200)
committerArkadiusz Miśkiewicz <arekm@maven.pl>
Sun, 28 Jun 2015 12:38:20 +0000 (14:38 +0200)
geninitrd

index bedd738067ab8ad4001cc86b719fb946debb32a6..7b962b5db452442ab604c6d60b277b32ca2aa72b 100755 (executable)
--- a/geninitrd
+++ b/geninitrd
@@ -1002,6 +1002,12 @@ initrd_gen_initramfs_switchroot() {
                        mknod -m 660 $device b $maj $min
                fi
 
+               # XXX hack, fallback to rootdev from geninitrd time
+               if [ ! -e "$device" ]; then
+                       device="$rootdev"
+                       echo "DEVICE set to $device based on fstab entry from initrd gen time"
+               fi
+
                # XXX hack, if no device, try to parse it from /proc/partitions using /proc/sys/kernel/real-root-dev
                if [ ! -e "$device" ]; then
                        rrd=$(cat /proc/sys/kernel/real-root-dev)
This page took 0.451382 seconds and 4 git commands to generate.