From cb73c11c846d1376c0f4754e4367b28a2b2a36ad Mon Sep 17 00:00:00 2001 From: Thomas Bächler Date: Sun, 14 Feb 2010 17:30:48 +0100 Subject: If filesystem type detection fails, print an error and instructions --- init | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'init') diff --git a/init b/init index 7d4b226..9dfb43f 100644 --- a/init +++ b/init @@ -158,6 +158,19 @@ if [ -z "${nfsroot}" -a "${root}" != "/dev/nfs" ]; then fstype="${rootfstype}" else fstype=$(eval $(/sbin/blkid -o udev -p "${root}"); echo $ID_FS_TYPE) + if [ -z "${fstype}" ]; then + err "Unable to determine the file system type of ${root}:" + echo "Either it contains no filesystem, an unknown filesystem," + echo "or more than one valid file system signature was found." + echo + echo "Try adding" + echo " rootfstype=your_filesystem_type" + echo "to the kernel command line." + echo "You are now being dropped into an emergency shell." + echo + launch_interactive_shell + msg "Trying to continue (this will most likely fail) ..." + fi fi if [ "${readwrite}" = "yes" ]; then rwopt="rw" -- cgit v1.2.3-24-g4f1b