Mounting and Unmounting Partitions

To attach filesystems to your directory tree, or mount them, use mount(8). If you’ve never manually mounted filesystems before, boot your OpenBSD machine into single-user mode (see Chapter 5) and follow along.

In single-user mode, OpenBSD mounts only one partition: the root partition, which it mounts read-only. The root partition contains just enough of the system to perform basic setup, establish core services, and find the other filesystems.

Because filesystems other than the root are not mounted, their content is not accessible. Look in, say, /usr on a system in single-user mode, and you’ll find that it’s empty. OpenBSD hasn’t lost the files; it just hasn’t mounted the partition containing those files.

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.