Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 08 Jul 2006 09:05:51 -0700
From:      Sam Leffler <sam@errno.com>
To:        Craig Rodrigues <rodrigc@crodrigues.org>
Cc:        freebsd-current@freebsd.org, freebsd-arch@freebsd.org
Subject:   Re: [RFC] mount can figure out fstype automatically
Message-ID:  <44AFD7DF.8090002@errno.com>
In-Reply-To: <20060708152801.GA3671@crodrigues.org>
References:  <20060708152801.GA3671@crodrigues.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Craig Rodrigues wrote:
> Hi,
> 
> One of the pet peeves I have with FreeBSD is that
> if I have a device with a local filesystem that I want to mount,
> I need to explicitly know what type of filesystem is on the
> device in order to mount it from the command-line.
> 
> For example,
> 
> mount -t cd9660
> mount -t udf
> mount -t ext2fs
> mount -t msdosfs
> 
> Where this is particularly annoying is if I have multiple
> USB thumb drives with different filesystems on them.
> 
> What I usually end up doing is something like:
> file - < /dev/ad0s4
> 
> to figure out the filesystem type, and then mount -t [whatever] to mount it.
> 
> What I would like to do is:
> 
> mount /dev/ad0s4 /mnt
> 
> and if I do not specify a filesystem type with -t, the mount
> program should "magically" figure out how to mount the disk.
> This is closer to how the mount program behaves on Linux for example.
> 
> I've come up with a patch that does this, by interpreting
> an fstype of "" as:
>  - starting with "ufs", iterate over all the local filesystem types
>    that we know about, and try to mount the device
> 
> Comments?

	<...patch deleted...>

Linux has -t auto; haven't looked at how it works.

It appears you just try a series of fs types; can't you read the device
to infer the filesystem?

	Sam



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44AFD7DF.8090002>