Fsck output does not match tutorials...
Keith
keith at caramail.com
Sun Mar 27 15:57:32 UTC 2022
On 3/26/22 2:29 PM, Jon LaBadie wrote:
> On Sat, Mar 26, 2022 at 08:16:33AM +0100, Bo Berglund wrote:
>> On Tue, 22 Mar 2022 17:45:36 -0500, Keith <keith at caramail.com> wrote:
>>
> ...
>>>>
>>>> sudo fsck -N /dev/sda2
>>>> fsck from util-linux 2.33.1
>>>> [/sbin/fsck.ext4 (1) -- /dev/sda2] fsck.ext4 /dev/sda2
>>>>
>>>
>>> sudo fsck.ext4 -n -v -f /dev/sda2
>>>
>
> Just an FYI regarding invoking fsck. Fsck starts
> by analyzing the type of file system on the device
> you specify then calls another program to do the
> actual work. For example, on my system there are
> these entries in /usr/sbin.
>
> fsck
> fsck.btrfs
> fsck.cramfs
> fsck.exfat
> fsck.ext2
> fsck.ext3
> fsck.ext4
> fsck.fat
> fsck.hfs
> fsck.hfsplus
> fsck.minix
> fsck.msdos
> fsck.ntfs
> fsck.vfat
> fsck.xfs
>
> While the specific fsck versions can be invoked
> directly it is seldom necessary.
>
> Fsck also checks that the options you specify
> are valid for the FS type on the device.
>
> -- Jon H. LaBadie ubu at labadie.us
>
>
True, but fsck by itself may not understand all the different options
that the individual checkers may use. Normally, fsck will pass options
it doesn't understand to the fs checker unless an option takes
arguments. If that's the case, you'd have to append "--" to the end of
the fsck command followed by the filesystem-specific checker option and
arguments.
Also, not all options are compatible across the fs checkers and fsck. An
option may mean something different to fsck.ext4 and fsck.vfat. For
example, "-t" means something different to fsck (specify filesystem type
to be checked) than it does to fsck.vfat (mark unreadable clusters bad).
To make sure the "-t" option is acted on by fsck.vfat and not fsck, you
will have to employ the append method described above.
Personally to me its just easier to use the specific fs checker that's
appropriate for the filesystem type to be checked, especially it I want
to exercise more control over what's checked, and how the checker will
fix any problems it encounters.
--
Keith
More information about the ubuntu-users
mailing list