[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Bug#567065: avoid mount -t unknown



On Tue, Jan 26, 2010 at 09:05:35PM -0500, Joey Hess wrote:
> 
> 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.

right that sounds good, will merge soon.

also it should no longer use the gone udev vol_id,
but blkid, haven't come around to see it's invocation pattern,
that should fix it also.
 
> Workaround: boot with rootfstype=btrfs
> 

> --- scripts/local.orig	2010-01-26 20:58:30.298669269 -0500
> +++ scripts/local	2010-01-26 20:59:28.974718882 -0500
> @@ -127,7 +127,11 @@
>  
>  	# 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






Reply to: