OpenBSD manual page server

Manual Page Search Parameters

VNCONFIG(8) System Manager's Manual VNCONFIG(8)

vnconfigconfigure vnode disks

vnconfig [-v] [-k | -K rounds [-S saltfile]] [-t disktype] [vnd_dev] image

vnconfig -l [vnd_dev]

vnconfig -u [-v] vnd_dev

The vnconfig command configures vnode pseudo disk devices. It will associate (or disassociate) the special file vnd_dev with the regular file image, allowing the latter to be accessed as though it were a disk. If vnd_dev is not specified, an unused one will be allocated and the name printed to stdout.

The options are as follows:

rounds
Associate an encryption key with the device. All data will be encrypted using the Blowfish cipher before it is written to the disk. The user is asked for both a passphrase and the name of a salt file. The salt file can also be specified on the command line using the -S option. The passphrase and salt are combined according to PKCS #5 PBKDF2 for the specified number of rounds to generate the actual key used. rounds is a number between 1000 and INT_MAX. DO NOT LOSE THE SALT FILE.
Associate an encryption key with the device. The user is asked for the encryption key. All data will be encrypted using the Blowfish cipher before it is written to the disk.
List the vnd devices and indicate which ones are in use. If a specific vnd_dev is given, then only that one will be described.
saltfile
When -K is used, specify the saltfile.
disktype
Specify a disktype entry from the disktab(5) database. The vnd_dev will have the sector size, sectors per track, and tracks per cylinder values of the specified disktype. The defaults are 512-byte sectors, 100 sectors per track and 1 track per cylinder.
Unconfigure a vnd_dev.
Print messages to stderr describing actions taken.

/dev/{,r}vnd*
 

Configure a CD-ROM or DVD image file as vnode disk vnd0 and mount the ISO 9660 file system contained in it:

# vnconfig vnd0 /tmp/diskimage
# mount -t cd9660 /dev/vnd0c /mnt

Configure an encrypted image file as vnode disk vnd0 and mount the FFS file system contained in the ‘a’ partition of the disklabel. Same as above, but now configure the vnode using PKCS #5 PBKDF2 and a salt file with 20000 rounds:

# vnconfig -K 20000 vnd0 /tmp/cryptimg
Encryption key:
Salt file: /tmp/cryptsalt
# mount /dev/vnd0a /mnt

vnd(4), disktab(5), fstab(5), mount(8), swapon(8), umount(8)

The vnconfig command first appeared in OpenBSD 4.2.

August 16, 2022 OpenBSD-7.4