fstyp(8) on Solnix vs Linux and the BSDs
On Solnix, fstyp is the illumos fstyp at /usr/sbin/fstyp. It runs one heuristic module per file system type, and its options (-a, -v) are unrelated to the -l, -s and -u of FreeBSD and NetBSD. The Solnix page says its results should not be used to make decisions about a device.
The manual pages
- Solnix: fstyp(8) from
pkgs.solnix.illumos-world-man· illumos.org - FreeBSD: fstyp(8) 15.1-RELEASE
- NetBSD: fstyp(8) 11.0
What Solnix runs
A default Solnix system runs the illumos fstyp at /usr/sbin/fstyp. No other variants are shipped. The synopsis also accepts an optional :logical-drive after the special argument.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD, NetBSD | option sets differ | Solnix fstyp takes -a and -v only. FreeBSD and NetBSD take -l, -s and -u only. A script using any of those BSD flags fails on Solnix, and the reverse also holds.Source: Solnix fstyp(8) SYNOPSIS, OPTIONS; FreeBSD fstyp(8) SYNOPSIS; NetBSD fstyp(8) SYNOPSIS |
| FreeBSD, NetBSD | printing the label | On FreeBSD and NetBSD, -l prints the file system label after the type. On Solnix, -a prints name-value attributes, and the generic attribute gen_volume_label holds the volume label if the file system provides one.Source: FreeBSD fstyp(8) -l; NetBSD fstyp(8) -l; Solnix fstyp(8) -a, gen_volume_label |
| FreeBSD, NetBSD | output format | The BSDs print the type name, plus the label with -l. Solnix -a adds one 'name: value' pair per line after the type. Strings are in single quotes, and nested lists are indented four spaces. Parse these differently.Source: Solnix fstyp(8) -a; FreeBSD fstyp(8) DESCRIPTION; NetBSD fstyp(8) DESCRIPTION |
| FreeBSD, NetBSD | exit status | Solnix exits 0 on a match, 1 with 'unknown_fstyp (no matches)', and 2 with 'unknown_fstyp (multiple matches)'. FreeBSD and NetBSD document only 0 on success and >0 on error or unrecognised type. Source: Solnix fstyp(8) DESCRIPTION; FreeBSD fstyp(8) EXIT STATUS; NetBSD fstyp(8) EXIT STATUS |
| FreeBSD, NetBSD | recognised file systems | Solnix runs a module per file system type. The page names ufs as an identifier example and refers to hsfs(4FS), pcfs(4FS) and ufs(4FS) in SEE ALSO, but does not list the full set. FreeBSD and NetBSD list the types they recognise and the names printed, such as cd9660, msdosfs, ntfs, ufs and zfs. Source: Solnix fstyp(8) DESCRIPTION, SEE ALSO; FreeBSD fstyp(8) DESCRIPTION; NetBSD fstyp(8) DESCRIPTION |
| FreeBSD, NetBSD | -u and non-mountable formats | On FreeBSD and NetBSD, -u adds formats mount(8) cannot handle, such as ZFS pools (and geli on FreeBSD). Solnix has no -u, and its page does not say which types it detects or whether ZFS is among them.Source: FreeBSD fstyp(8) -u; NetBSD fstyp(8) -u; Solnix fstyp(8) OPTIONS |
| FreeBSD, NetBSD | file type restriction | On FreeBSD and NetBSD, fstyp works only on regular files and disk-like device nodes unless -s is given. The Solnix page documents no such restriction and no -s.Source: FreeBSD fstyp(8) -s; NetBSD fstyp(8) -s; Solnix fstyp(8) OPTIONS |
| FreeBSD, NetBSD | verbose output | Solnix -v prints superblock information that varies by file system type, with details in ufs(4FS), mkfs_ufs(8) and tunefs(8). FreeBSD and NetBSD have no -v.Source: Solnix fstyp(8) -v; FreeBSD fstyp(8) SYNOPSIS; NetBSD fstyp(8) SYNOPSIS |
| FreeBSD | sandboxing | FreeBSD fstyp runs sandboxed using capsicum(4). The Solnix and NetBSD pages do not mention sandboxing. Source: FreeBSD fstyp(8) DESCRIPTION; Solnix fstyp(8); NetBSD fstyp(8) |
| FreeBSD, NetBSD | reliability statement | The Solnix page twice says fstyp is unreliable and its results should not drive decisions about using a device or partition. The FreeBSD and NetBSD pages carry no such warning. Source: Solnix fstyp(8) DESCRIPTION, NOTES; FreeBSD fstyp(8); NetBSD fstyp(8) |
| FreeBSD, NetBSD | clean-state check | With -a, Solnix reports gen_clean. If it is false, the file system is damaged or was not cleanly unmounted and fsck(8) must be run before mounting. The BSD pages document no equivalent.Source: Solnix fstyp(8) -a gen_clean; FreeBSD fstyp(8); NetBSD fstyp(8) |
Standards
- POSIX: fstyp is not a POSIX.1-2024 utility.
- Solnix: The Solnix page names attributes(7) and largefile(7) in SEE ALSO, but the bundle text has no ATTRIBUTES or stability section.
Writing portable scripts
- Do not rely on fstyp options in portable scripts: Solnix has
-aand-v, while FreeBSD and NetBSD have-l,-sand-u. Use a bare 'fstyp special' and read only the first line of output. - Treat any non-zero exit as 'unknown'. Solnix uses 1 and 2, the BSDs only say >0. Do not use the result alone to decide whether to mount or reformat a device.
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.