summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--hook-functions6
1 files changed, 6 insertions, 0 deletions
diff --git a/hook-functions b/hook-functions
index 6a6e233..0a6c9b7 100644
--- a/hook-functions
+++ b/hook-functions
@@ -226,6 +226,12 @@ dep_add_modules()
# findout root block device + fstype
eval "$(mount | awk '/\/dev\// {if ($3 == "/") {print "root=" $1 "\nFSTYPE=" $5; exit}}')"
+ if [ -z "$root" ]; then
+ echo "mkinitramfs: failed to determine root device"
+ echo "mkinitramfs: workaround is MODULES=most"
+ echo "Error please report bug on initramfs-tools and include the output of 'mount'"
+ exit 1
+ fi
# handle ubifs and return since ubifs root is a char device but
# most of the commands below only work with block devices.