Mount ZFS in FreeBSD single user mode

Software

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.

Author bio and support

Me!

Ruben Schade is a technical writer and IaaS engineer in Sydney, Australia who refers to himself in the third person in bios. Wait, not BIOS… my brain should be EFI by now.

The site is powered by Hugo, FreeBSD, and OpenZFS on OrionVM, everyone’s favourite cloud infrastructure provider.

You can leave me a comment by contacting me, and I might publish your thoughts. Please read the FAQs first though.

If you found this post helpful or entertaining, you can shout me a coffee or buy some silly merch. Thanks!