Mounting Filesystem Images

You can mount a disk image and access the image just as you would a disk partition. This is very useful for those times you want to extract a few files from an ISO but don’t want to bother burning the image to physical media. The trick to mounting a disk image is attaching the image to a device node so that you can use the proper mount command.

OpenBSD uses the vnconfig(8) program to attach disk images to device nodes. (Remember that a vnode is an abstraction layer between the kernel and a filesystem.) Use vnconfig to “wire” vnodes between a file and a device node, and then access them through OpenBSD’s /dev/svnd devices. Depending on the disk image type, the image might have MBR partitions, disklabel partitions, or ...

Get Absolute OpenBSD, 2nd Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.