From 90c19d7bac748efdaab0355d4aa3a25b579bc0f2 Mon Sep 17 00:00:00 2001 From: Joey Hess Date: Tue, 26 Jan 2010 21:05:35 -0500 Subject: scripts/local: avoid mount -t unknown Since fstype does not support btrfs (#548047), and since udev 150, vol_id no longer exists, get_fstype sets FSTYPE to "unknown", and then the root filesystem is mounted using "mount -t unknown /dev/hda2 /root". Of course, that fails, and with a really unhelpful error message ("mount: device doesnot exist") Why not just skip the -t parameter if FSTYPE=unknown? Mounting the root fs was going to fail, so letting mount autodetect the fs type can't be worse. Attached patch does that and got my root on btrfs working. Workaround: boot with rootfstype=btrfs Signed-off-by: maximilian attems --- scripts/local | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'scripts') diff --git a/scripts/local b/scripts/local index b6bd192..7bc740f 100644 --- a/scripts/local +++ b/scripts/local @@ -127,7 +127,11 @@ mountroot() # FIXME This has no error checking # Mount root - mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt} + if [ "${FSTYPE}" != "unknown" ]; then + mount ${roflag} -t ${FSTYPE} ${ROOTFLAGS} ${ROOT} ${rootmnt} + else + mount ${roflag} ${ROOTFLAGS} ${ROOT} ${rootmnt} + fi [ "$quiet" != "y" ] && log_begin_msg "Running /scripts/local-bottom" run_scripts /scripts/local-bottom -- cgit v1.2.3