diff options
Diffstat (limited to 'hooks/filesystems')
-rw-r--r-- | hooks/filesystems | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/hooks/filesystems b/hooks/filesystems index 0990b4c..4fe655c 100644 --- a/hooks/filesystems +++ b/hooks/filesystems @@ -5,18 +5,19 @@ run_hook () if [ "x${rootfstype}" != "x" ]; then FSTYPE="${rootfstype}" else - if [ "x${root}" != "x" ]; then + if [ ! -e "${root}" ]; then msg "Attempting to create root device '${root}'" dev_t=$( /bin/parseblock "${root}" ) if [ "x${dev_t}" != "x" ]; then /bin/mknod "${root}" b ${dev_t} >/dev/null 2>&1 - eval $( /bin/fstype < "${root}" ) else FSTYPE="unknown" echo "ERROR: Failed to parse block device '${root}'" fi - else - FSTYPE="unknown" + fi + eval $( /bin/fstype < "${root}" ) + + if [ "${FSTYPE}" = "unknown" ]; then echo "ERROR: root fs cannot be detected. Try using the rootfstype= kernel parameter." fi fi |