A question about fsck and the -t option
cyberleo at cyberleo.net
Wed Apr 2 17:01:52 UTC 2014
On 04/02/2014 03:33 AM, Ronald F. Guilmette wrote:
> If fsck is invoked upon a /dev device node which is a hard disk
> partition containing a valid file system, and if this invocation
> of fcsk _does not_ include any -t or -T options, then does fsck
> make any sort of attempt to automagically determine or intuit what
> sort of file system exists upon and within the given partition?
> Previous to today, I had always believed that either (a) fsck looked
> at the magic number in the first word of the partition in order to
> automagically determine the file system type or else (b) that fsck,
> on FreeBSD at least, defaulted (in the absence of any explicit -t or
> -T options) to assuming that the file system type was ufs. But as of
> this moment it appears to me that neither of these assumptions were or
> are true, and that in the absence of all -t and/or -T options, fsck on
> FreeBSD simply throws up its hands and says "Could not determine
> filesystem type".
> Is this the intended outcome in such cases?
A glance at the source code suggests that it attempts to infer the
type from the fstab, and then the BSD disklabel. It does not appear to
attempt a guess from the filesystem magic itself.
<CyberLeo at CyberLeo.Net>
Furry Peace! - http://www.fur.com/peace/
More information about the freebsd-questions