prtvtoc(8) on Solnix vs Linux and the BSDs
prtvtoc is the illumos command at /usr/sbin/prtvtoc. It only displays a disk's label (VTOC), and only for the super-user. The Linux and BSD counterparts (sfdisk, gpart, disklabel) also create or change partitions, and their single-letter flags mean different things.
The manual pages
- Solnix: prtvtoc(8) from
pkgs.solnix.illumos-world-man· illumos.org - Linux: sfdisk(8) util-linux-2.42.3 (different command, similar job)
- FreeBSD: gpart(8) 15.1-RELEASE (different command, similar job)
- OpenBSD: disklabel(8) 8.0 (different command, similar job)
- NetBSD: disklabel(8) 11.0 (different command, similar job)
What Solnix runs
A default Solnix system runs the illumos prtvtoc at /usr/sbin/prtvtoc. No other variants are shipped. The page says prtvtoc views the label only. It points to fmthard(8) and format(8) in SEE ALSO, but the bundle does not describe them. The device is given as /dev/rdsk/c*t*d*s2 or /dev/dsk/c*t*d*s2.
Differences
| Compared with | Topic | What differs |
|---|---|---|
| all four | read-only versus editing tools | Solnix prtvtoc only lets you view the label. sfdisk, gpart and disklabel also create, modify or write labels or partition tables. The Solnix page documents no option that changes the disk. Source: Solnix prtvtoc(8) DESCRIPTION, OPTIONS; Linux sfdisk(8) DESCRIPTION; FreeBSD gpart(8) SYNOPSIS; OpenBSD disklabel(8) -w, -e, -E; NetBSD disklabel(8) -w, -e, -i |
| Linux | -f meaning | Solnix prtvtoc -f reports free space: starting block, number of blocks and unused partitions. sfdisk -f (--force) disables all consistency checking. The same letter is harmless on Solnix and a safety override on Linux.Source: Solnix prtvtoc(8) -f; Linux sfdisk(8) -f, --force |
| OpenBSD, NetBSD | -f meaning | On OpenBSD, disklabel -f file writes fstab(5)-format entries to a file. On NetBSD, -f disktab names a file to use instead of /etc/disktab. On Solnix, -f only reports free space.Source: Solnix prtvtoc(8) -f; OpenBSD disklabel(8) -f; NetBSD disklabel(8) -f |
| Linux, OpenBSD | -h meaning | Solnix prtvtoc -h omits headers from the output. OpenBSD disklabel -h prints partition sizes in human-readable form. For sfdisk the flag list shows -h and --help, and the help text in this bundle is trimmed.Source: Solnix prtvtoc(8) -h; OpenBSD disklabel(8) -h; Linux sfdisk(8) option list |
| OpenBSD, NetBSD | -t meaning | Solnix prtvtoc -t vfstab takes a file argument and replaces /etc/vfstab as the list of filesystem defaults. On OpenBSD and NetBSD, disklabel -t takes no argument and formats the label as a disktab(5) entry.Source: Solnix prtvtoc(8) -t; OpenBSD disklabel(8) -t; NetBSD disklabel(8) -t |
| NetBSD | -m meaning | Solnix prtvtoc -m mnttab replaces /etc/mnttab as the list of mounted filesystems. NetBSD disklabel -m takes no argument and tells it to expect the label to have an MBR.Source: Solnix prtvtoc(8) -m; NetBSD disklabel(8) -m |
| FreeBSD | -s meaning | Solnix prtvtoc -s omits all headers except the column header. In FreeBSD gpart, -s names a partitioning scheme for create and a partition size for add and resize.Source: Solnix prtvtoc(8) -s; FreeBSD gpart(8) SYNOPSIS create -s scheme, add -s size |
| FreeBSD | viewing syntax | FreeBSD views partitions with the gpart show action, which accepts -l, -r and -p. Solnix prtvtoc has no subcommands and takes a single device argument.Source: FreeBSD gpart(8) SYNOPSIS (show [-l | -r] [-p]); Solnix prtvtoc(8) SYNOPSIS |
| OpenBSD, NetBSD | device naming | Solnix expects /dev/rdsk/c*t*d*s2 or /dev/dsk/c*t*d*s2, with slice 2 as the whole-disk device. OpenBSD accepts /dev/rwd0c, /dev/wd0c or wd0. NetBSD also accepts short names such as xy0 and fills in a partition letter. Source: Solnix prtvtoc(8) DESCRIPTION; OpenBSD disklabel(8) disk; NetBSD disklabel(8) BUGS |
| NetBSD | exit status | NetBSD disklabel documents exit codes 0, 1, 4 and 101..n (the number of warnings plus 100). The Solnix prtvtoc page has no EXIT STATUS section, so scripts cannot rely on specific codes from the manual. Source: NetBSD disklabel(8) EXIT STATUS; Solnix prtvtoc(8) (no EXIT STATUS section) |
| all four | privilege and label types | The Solnix page says only the super-user can use prtvtoc. It does not mention GPT. sfdisk lists MBR, GPT, SUN and SGI labels, and FreeBSD gpart works on GEOM partitioning schemes. The Solnix page does not say which label types it handles. Source: Solnix prtvtoc(8) DESCRIPTION; Linux sfdisk(8) DESCRIPTION; FreeBSD gpart(8) DESCRIPTION |
Everyday tasks
| Task | Solnix | Linux | FreeBSD | OpenBSD | NetBSD |
|---|---|---|---|---|---|
| show the partition table or label | prtvtoc /dev/rdsk/c*t*d*s2 | — | gpart show geom | disklabel disk | disklabel disk |
| show free space | prtvtoc -f device | — | — | — | — |
| print without headers | prtvtoc -h device | — | — | — | — |
| print sizes in human-readable form | — | — | — | disklabel -h disk | — |
| print the label as a disktab entry | — | — | — | disklabel -t disk | disklabel -t disk |
| write or edit a label | see fmthard(8) and format(8) | sfdisk device | gpart create -s scheme provider; gpart add -t type geom | disklabel -w, -e or -E disk | disklabel -w, -e or -i disk |
| back up and restore a partition table | — | sfdisk -b device | gpart backup geom; gpart restore provider | disklabel -R disk protofile | disklabel -R disk protofile |
Standards
- POSIX: prtvtoc is not a POSIX.1-2024 utility.
- Solnix: The bundle shows no STANDARDS or ATTRIBUTES section for prtvtoc(8). It lists attributes(7) only in SEE ALSO.
Writing portable scripts
- Do not use one flag set across these tools.
-f,-h,-m,-sand-teach mean something different on Solnix, Linux, FreeBSD, OpenBSD and NetBSD. Pick the tool by OS and branch on which command is present. - Use the Solnix device path form /dev/rdsk/c*t*d*s2 only on Solnix. Other systems use their own disk names, so do not hard-code device paths in a shared script.
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.