diff options
author | Joey Hess <joeyh@debian.org> | 2010-01-26 21:05:35 -0500 |
---|---|---|
committer | maximilian attems <maks@debian.org> | 2010-01-30 19:44:24 +0100 |
commit | 90c19d7bac748efdaab0355d4aa3a25b579bc0f2 (patch) | |
tree | 1e405fbaf4e7bd90c8026821f05ea10bf73655c6 /scripts/local | |
parent | 0e653d64758e03fd77b8ab436c8ca36cff9ee4c9 (diff) | |
download | initramfs-tools-90c19d7bac748efdaab0355d4aa3a25b579bc0f2.tar.gz initramfs-tools-90c19d7bac748efdaab0355d4aa3a25b579bc0f2.zip |
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 <maks@debian.org>
Diffstat (limited to 'scripts/local')
-rw-r--r-- | scripts/local | 6 |
1 files changed, 5 insertions, 1 deletions
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 |