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.

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 withTopicWhat differs
all fourread-only versus editing toolsSolnix 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 meaningSolnix 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 meaningOn 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 meaningSolnix 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 meaningSolnix 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 meaningSolnix 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 meaningSolnix 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
FreeBSDviewing syntaxFreeBSD 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, NetBSDdevice namingSolnix 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
NetBSDexit statusNetBSD 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 fourprivilege and label typesThe 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

TaskSolnixLinuxFreeBSDOpenBSDNetBSD
show the partition table or labelprtvtoc /dev/rdsk/c*t*d*s2—gpart show geomdisklabel diskdisklabel disk
show free spaceprtvtoc -f device————
print without headersprtvtoc -h device————
print sizes in human-readable form———disklabel -h disk—
print the label as a disktab entry———disklabel -t diskdisklabel -t disk
write or edit a labelsee fmthard(8) and format(8)sfdisk devicegpart create -s scheme provider; gpart add -t type geomdisklabel -w, -e or -E diskdisklabel -w, -e or -i disk
back up and restore a partition table—sfdisk -b devicegpart backup geom; gpart restore providerdisklabel -R disk protofiledisklabel -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, -s and -t each 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.