newfs(8) on Solnix vs Linux and the BSDs
On Solnix, newfs is the illumos front-end to mkfs(8) at /usr/sbin/newfs, and it builds UFS on a raw /dev/rdsk device. Its single-letter flags differ widely from the BSD newfs: -S, -B, -T, -v, -a, -d, -n and -t all mean something else, so BSD newfs command lines will not work unchanged.
The manual pages
- Solnix: newfs(8) from
pkgs.solnix.illumos-world-man· illumos.org - FreeBSD: newfs(8) 15.1-RELEASE
- OpenBSD: newfs(8) 8.0
- NetBSD: newfs(8) 11.0
What Solnix runs
A default Solnix system runs the illumos newfs at /usr/sbin/newfs. No other variants are shipped. The page says newfs calculates parameters and calls mkfs(8). The options after -NSBTv are passed to mkfs, and mkfs_ufs(8) holds further detail. Other exit values may come from mkfs.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| FreeBSD, OpenBSD, NetBSD | -S meaning | Solnix -S prints a human-readable version of the superblock to stdout. On FreeBSD, OpenBSD and NetBSD, -S sets the sector size in bytes. A BSD script passing -S 512 to Solnix newfs will not do what it expects.Source: Solnix newfs(8) -S; FreeBSD newfs(8) SYNOPSIS -S sector-size; OpenBSD newfs(8) -S; NetBSD newfs(8) -S |
| NetBSD | -B meaning | Solnix -B writes a binary (machine-readable) superblock to stdout. NetBSD -B sets the metadata byte order of the new file system (be or le).Source: Solnix newfs(8) -B; NetBSD newfs(8) -B byte-order |
| FreeBSD, OpenBSD, NetBSD | -T meaning | Solnix -T sets the file system up to grow past 1 TB: fragsize equals bsize and nbpi is 1 Mbyte. On FreeBSD, OpenBSD and NetBSD, -T takes a disktype argument.Source: Solnix newfs(8) -T; FreeBSD newfs(8) -T disktype; OpenBSD newfs(8) -T disktype; NetBSD newfs(8) SYNOPSIS -T disk-type |
| NetBSD | -v meaning | Solnix -v is verbose: it prints the actions and the parameters passed to mkfs. NetBSD -v takes a volname argument, and verbose is -V.Source: Solnix newfs(8) -v; NetBSD newfs(8) SYNOPSIS -v volname, -V verbose |
| FreeBSD, OpenBSD, NetBSD | -a, -d, -n, -t meanings | Solnix -a is alternate sectors per cylinder, -d is an obsolete rotational delay forced to 0, -n is rotational positions and -t is tracks per cylinder. FreeBSD and NetBSD -a is maxcontig. FreeBSD -d and NetBSD -d set the maximum extent size. NetBSD -n is the inode count. OpenBSD -t is fstype. Solnix sets maxcontig with -C.Source: Solnix newfs(8) -a, -d, -n, -t, -C; FreeBSD newfs(8) -a, -d; NetBSD newfs(8) -a, -d, -n; OpenBSD newfs(8) -t |
| FreeBSD, OpenBSD, NetBSD | file system format selection | Solnix newfs has no -O option, and its page does not describe a UFS1/UFS2 choice. FreeBSD -O 1|2 defaults to UFS2. OpenBSD -O defaults to FFS2 for newfs. NetBSD -O defaults to 1 (FFSv1).Source: Solnix newfs(8) SYNOPSIS and OPTIONS; FreeBSD newfs(8) -O; OpenBSD newfs(8) -O; NetBSD newfs(8) -O |
| FreeBSD, OpenBSD, NetBSD | block size default and limits | Solnix -b accepts only 4096 or 8192, default 8192. FreeBSD accepts any power of 2 from 4096, default 32768. OpenBSD defaults to 16 KB or eight times the fragment size, whichever is smaller. NetBSD's default depends on file system size.Source: Solnix newfs(8) -b; FreeBSD newfs(8) -b; OpenBSD newfs(8) -b; NetBSD newfs(8) -b |
| FreeBSD, OpenBSD, NetBSD | fragment size default | Solnix -f defaults to 1024 bytes. FreeBSD defaults to 4096, and OpenBSD to 2048 when no disklabel is available. NetBSD's default is 0.5 KB to 4 KB depending on file system size.Source: Solnix newfs(8) -f; FreeBSD newfs(8) -f; OpenBSD newfs(8) -f; NetBSD newfs(8) -f |
| FreeBSD, OpenBSD | -c unit | Solnix -c is cylinders per cylinder group (16 to 256), and is ignored on EFI-labelled disks. FreeBSD -c is blocks per cylinder group and OpenBSD -c is fragments per cylinder group. The NetBSD synopsis has no -c.Source: Solnix newfs(8) -c; FreeBSD newfs(8) -c; OpenBSD newfs(8) -c; NetBSD newfs(8) SYNOPSIS |
| OpenBSD, NetBSD | free-space and optimization defaults | Solnix -m defaults to (64 Mbytes / partition size) * 100, limited to 1%-10%, and -o defaults to time. OpenBSD and NetBSD -m defaults to 5%. Their -o default is space or time depending on whether minfree is below 5%.Source: Solnix newfs(8) -m, -o; OpenBSD newfs(8) -m, -o; NetBSD newfs(8) -m, -o |
| FreeBSD, OpenBSD, NetBSD | inode density default | Solnix -i nbpi defaults by disk size: 2048 below 1GB, 4096 below 2GB, 6144 below 3GB, 8192 up to 1 Tbyte, and 1048576 above 1 Tbyte or with -T. FreeBSD uses 2*frag-size, OpenBSD 4 fragments, and NetBSD 4*frag-size scaled by file system size.Source: Solnix newfs(8) -i; FreeBSD newfs(8) -i; OpenBSD newfs(8) -i; NetBSD newfs(8) -i |
| FreeBSD, OpenBSD, NetBSD | prompting and fsirand | Solnix newfs asks for confirmation when stdin is a tty and calls fsirand(8) unless -N is given. OpenBSD builds fsirand in. In the shown text, FreeBSD and NetBSD say nothing about prompting. Neither Solnix nor OpenBSD documents a prompt-suppress flag.Source: Solnix newfs(8) DESCRIPTION; OpenBSD newfs(8) DESCRIPTION; FreeBSD newfs(8) DESCRIPTION; NetBSD newfs(8) DESCRIPTION |
Standards
- POSIX: newfs is not a POSIX.1-2024 utility.
- Solnix: The page lists attributes(7) and largefile(7) under SEE ALSO. The shown text has no STANDARDS section.
Writing portable scripts
- Do not share one newfs command line across systems.
-S,-B,-T,-v,-a,-d,-nand-tmean different things, and Solnix has no-O,-U,-jor-q. - Use
-Nfirst on each system to print the parameters before creating the file system.
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.