fsck(8) on Solnix vs Linux and the BSDs

On Solnix, fsck is the illumos front end at /usr/sbin/fsck that hands work to a filesystem-specific checker, normally ufs. Its generic options differ from Linux and the BSDs: the type is chosen with -F (not -t), preen and force are -o p and -o f (not -p and -f), and the exit codes are different.

What Solnix runs

A default Solnix system runs the illumos fsck at /usr/sbin/fsck. No other variants are shipped. It reads /etc/vfstab, not /etc/fstab, and the page points to fsck_ufs(8) for filesystem-specific details. The page says it may not be supported for all FSTypes.

Differences

Compared withTopicWhat differs
all fourselecting filesystem typeSolnix uses -F FSType. Linux, FreeBSD, OpenBSD and NetBSD use -t fstype (a comma-separated list, with a negating 'no' prefix). The Solnix synopsis has no -t, so fsck -t ufs fails there.
Source: Solnix fsck(8) SYNOPSIS, -F; Linux fsck(8) -t; FreeBSD fsck(8) -t; OpenBSD fsck(8) -t; NetBSD fsck(8) -t
FreeBSD-F meaningOn FreeBSD, -F runs in foreground mode as part of boot, and -B runs background checking. On Solnix, -F names the filesystem type, and the page describes no background mode.
Source: Solnix fsck(8) -F; FreeBSD fsck(8) -F, -B
FreeBSD, OpenBSD, NetBSDpreen and force are -o options on SolnixOn the BSDs, -p (preen) and -f (force) are top-level options. On Solnix they are filesystem-specific options: -o p and -o f. The Solnix page says -o p is required to enable parallel checking.
Source: Solnix fsck(8) -o p, -o f; FreeBSD fsck(8) -p, -f; OpenBSD fsck(8) -p, -f; NetBSD fsck(8) -p, -f
FreeBSD, OpenBSD, NetBSD-v and dry-runOn the BSDs, -v prints the commands before running them, and -d prints them without running. On Solnix, -v turns on verbose output (not supported by every checker), and -V echoes the expanded command line without executing it.
Source: Solnix fsck(8) -v, -V; FreeBSD fsck(8) -v, -d; OpenBSD fsck(8) -v, -d; NetBSD fsck(8) -v, -d
Linux, OpenBSD-N and -lSolnix -N is the same as -n (assume no, do not open for writing), and Solnix has no -l. On OpenBSD, -N selects only filesystems with the 'net' mount option, and -l limits parallel checks. On Linux, -l takes a flock lock file.
Source: Solnix fsck(8) -n | -N; OpenBSD fsck(8) -N, -l; NetBSD fsck(8) -l; Linux fsck(8) -l
all four-m check-only modeSolnix -m checks without repairing and reports through the exit status whether the filesystem is fit to mount. Exit status 32 then means it is unmounted and needs checking. The other pages' synopses and option lists in the bundle show no -m.
Source: Solnix fsck(8) -m, EXIT STATUS 32; Linux, FreeBSD, OpenBSD, NetBSD fsck(8) SYNOPSIS
Linux, NetBSDexit status valuesSolnix returns distinct codes: 0, 1, 32-37, 39, 40. Linux returns a bit-wise OR of 1, 2, 4, 8, 16, 32 and 128. NetBSD uses 1, 2, 4, 8 and 12. Code 32 means 'needs checking' on Solnix but 'canceled by user' on Linux.
Source: Solnix fsck(8) EXIT STATUS; Linux fsck(8) DESCRIPTION; NetBSD fsck(8) EXIT STATUS
FreeBSD, OpenBSDexit status documentationThe FreeBSD and OpenBSD pages in the bundle have no EXIT STATUS section. OpenBSD says only that major problems in preen mode give a non-zero exit. Solnix lists its codes explicitly.
Source: FreeBSD fsck(8); OpenBSD fsck(8) -p; Solnix fsck(8) EXIT STATUS
all fourdefault file and device namingWith no arguments, Solnix checks /etc/vfstab entries that have a fsckdev and a non-zero fsckpass. The others read /etc/fstab. Solnix wants the character device (/dev/rdsk/...), not the block device. Linux also accepts mount points, labels and UUIDs.
Source: Solnix fsck(8) DESCRIPTION; Linux fsck(8) DESCRIPTION; FreeBSD fsck(8) DESCRIPTION; OpenBSD fsck(8) DESCRIPTION; NetBSD fsck(8) DESCRIPTION
Linux, FreeBSDtype detectionWith no -F, Solnix looks for the device in /etc/vfstab, then uses the default local type in /etc/default/fs. FreeBSD tries to detect the type and fails with an 'unknown file system type' message. Linux falls back to ext2.
Source: Solnix fsck(8) DESCRIPTION; FreeBSD fsck(8) DESCRIPTION; Linux fsck(8) -t
OpenBSD, NetBSDmounted filesystemsSolnix does not work on a mounted block device and exits 33 for an already-mounted filesystem. Exit 35 means a read/write mounted filesystem was modified and a reboot is needed. OpenBSD and NetBSD skip read-write mounted filesystems by default; NetBSD -f overrides this.
Source: Solnix fsck(8) DESCRIPTION, EXIT STATUS 33, 35; OpenBSD fsck(8) DESCRIPTION; NetBSD fsck(8) DESCRIPTION, -f
OpenBSDalternate superblockOn Solnix, give an alternate superblock with -o b=n; block 32 is always one of them, and newfs -Nv shows others. On OpenBSD, use -b block#, valid only for ffs and ext2fs.
Source: Solnix fsck(8) -o b=n; OpenBSD fsck(8) -b

Standards

  • POSIX: fsck is not a POSIX.1-2024 utility.
  • Solnix: Interface Stability: Committed.

Writing portable scripts

  • Do not branch on specific fsck exit codes across systems: 32 means 'needs checking' on Solnix but 'canceled by user' on Linux. Treat only 0 as success.
  • Do not use -t, -F, -p or -f in a cross-platform script. Wrap the filesystem-specific invocation per OS: -F type and -o p on Solnix, -t type and -p on the BSDs.

Every difference here is taken from the manual pages linked above: Solnix's published page, Linux (man-pages and the GNU and util-linux manuals), FreeBSD, OpenBSD and NetBSD. Each row names its source. Where a manual is silent, this page is too. Compiled 2026-10-26. Found a mistake? Mail hackers@lists.solnix.io.