ZFS on root in single user mode on FreeBSD

Last week, I decided to pick up a Black Friday VPS to save a few bucks and try out something a bit different. The dedicated server I’ve been using is much more than I needed anyway.

When I installed the FreeBSD ISO, I thought what the Hell, I’ll give ZFS a try for something different. I’ve been wanting to check that out for years, but just haven’t done it yet.

As I typically do with my fat fingers, I screwed up one of the settings when I was editing my rc.conf for the settings. I noticed it after I rebooted and couldn’t ssh into the server. No big deal, I can just use the console and log in from there.

It was in single user mode, but I couldn’t edit the rc.conf because the ZFS was read only. I did some googling around to figure that out instead of just reinstalling with the UFS which I’m comfortable with since I wanted to solve the problem and learn something new instead. All it took was this.

zfs mount -a zfs set readonly=off zroot/ROOT/default