Mount ZFS in FreeBSD single user mode

FreeBSD

I've had a decent amount of experience with ZFS for data volumes, but it wasn't till FreeBSD 10 that I've been using it for my boot volume. In the process, I've found myself relearing a lot of tooling.

A mistake BSDers are all too familiar with is an rc.conf typo, which results in this after a reboot:

/etc/rc.conf: 19: Syntax error: Unterminated quoted string
Enter full pathname of shell or RETURN for /bin/sh:

In the case of UFS2, you'd mount read-write and edit the file. With a ZFS pool however, you get this:

# mount -w /
==> mount: /: unknown special file or file system.

Instead, you mount the following:

# mount -u /
# mount -a -t zfs

Now you can correct your mistake and be on your way.


Imprint

This is one of about 5000 posts on Rubénerd. View the home page for the latest, or related posts also tagged with:

If you liked this post, feel free to buy me a coffee, leave me a comment on Twitter, or email me at weblog2017@rubenschade.com. Thanks :).