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.
The manual pages
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 with | Topic | What differs |
|---|---|---|
| all four | selecting filesystem type | Solnix 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 meaning | On 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, NetBSD | preen and force are -o options on Solnix | On 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-run | On 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 -l | Solnix -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 mode | Solnix -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, NetBSD | exit status values | Solnix 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, OpenBSD | exit status documentation | The 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 four | default file and device naming | With 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, FreeBSD | type detection | With 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, NetBSD | mounted filesystems | Solnix 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 |
| OpenBSD | alternate superblock | On 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,-por-fin a cross-platform script. Wrap the filesystem-specific invocation per OS:-Ftype and-op on Solnix,-ttype and-pon 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.