Solved fsck -fy without specifying a file system: force, but no check

From <https://www.freebsd.org/cgi/man.cgi?query=fsck&sektion=8&manpath=FreeBSD#DESCRIPTION>:

… If no file systems are specified, fsck reads the table /etc/fstab to determine which file systems to check. Only partitions in /etc/fstab that are mounted "rw", "rq" or "ro" and that have non-zero pass number are checked. File systems with pass number 1 (normally just the root file system) are always checked one at a time. …

Below, UFS and -f for force. fsck -fy does not perform a check:
2021-11-13 02:03:54 fsck -fy.png

Am I missing something, or is this a bug?
 
Does -f not (forcefully) ignore that condition?

IIRC I have, previously, always seen UFS (and other file systems such as msdosfs for the ESP) checked in single user mode in response to fsck -fy
 
… ah, OK, I blindly added the two zeros to the UFS line without understanding the impact in this context.

(This is an extraordinary christhegeek -ish installation where the UFS line lacked values.)
 
… ah, OK, I blindly added the two zeros to the UFS line without understanding the impact in this context.

(This is an extraordinary christhegeek -ish installation where the UFS line lacked values.)
(In September, I corrected the line properly. Today, I misused zeros.)
[...]
Loosely speaking, it triggers whatever checker is appropriate.

Well, "man"-unally speaking, fsck(8) :
The fsck utility invokes file system-specific programs to check the spe-
cial devices listed in the fstab(5) file or in the command line for con-
sistency.

I think those zeros (when apropriately being zeros) are the responsibility of the sysadmin/issuer of xxxBSD. However, in this case/thread, regarding the sixth field, you probably didn't "misuse" anything, fstab(5) :
If the sixth field is not present or is zero, a value of zero is returned
and fsck(8) and quotacheck(8) will assume that the file system does not
need to be checked.
as I presume even for a "This is an extraordinary christhegeek -ish installation where the UFS line lacked values." the values read from /etc/fstab are being read correctly by fsck(8) by means of (as stated in fstab(5) ):
The proper way to read records from fstab is to use the routines
getfsent(3), getfsspec(3), getfstype(3), and getfsfile(3).


P.S. just curious (o.a. referring to your first screenshot with cat /etc/fstab) : is "your" /etc/fstab usually/often beheaded?
(mine has a fully commented-out header as first line with the apropriate field names)
 
When i do "fsck -f -y" nothing happens.
Without "device", it checks /etc/fstab, and it proceeds if a partition meets this criteria
1. Options: 'rw', 'rq' or 'ro'
AND
2. Pass# != 0
-- The sixth field in the fstab(5) file, i.e. fs_passno

Note:
Option "-f" also check clean filesystems. Without that, it doesn't check clean ones.
 
Output of tunefs:
Code:
tunefs: POSIX.1e ACLs: (-a)                                disabled 
tunefs: NFSv4 ACLs: (-N)                                   disabled 
tunefs: MAC multilabel: (-l)                               disabled 
tunefs: soft updates: (-n)                                 enabled 
tunefs: soft update journaling: (-j)                       enabled 
tunefs: gjournal: (-J)                                     disabled 
tunefs: trim: (-t)                                         disabled 
tunefs: maximum blocks per file in a cylinder group: (-e)  4096 
tunefs: average file size: (-f)                            16384 
tunefs: average number of files in a directory: (-s)       64 
tunefs: minimum percentage of free space: (-m)             8% 
tunefs: space to hold for metadata blocks: (-k)            6400 
tunefs: optimization preference: (-o)                      time 
tunefs: volume label: (-L)
I don't see directly something which is influential on fsck.

fstab contains
Code:
/dev/ada2p9 /bootpartition ufs late,ro 0,0
 
There shouldn't be a comma between the last two fields. Fields are separated by whitespace (spaces and/or tabs). And yes, your root filesystem should have a pass of 1. Additional filesystems can have a pass of 2, 3, etc. Those will be done in order of their pass number, you don't want to fsck(8) too many filesystems at once (that'll perform quite badly).
 
Back
Top