bectl vs. zfs commands to mount a BE

Background: I'm struggling with an x.org driver issue in 15.1-RELEASE but that's not the subject here.

To disable the driver, I needed to edit /etc/rc.conf and then reboot.
I rebooted into an older BE and tried to mount the 'default' BE via zfs with a specific mountpoint eg. /media.
This failed so bad that bectl list and zpool list stopped working.

However, using bectl mount default /media worked fine.

I tried zfs mount -o mountpoint=/media zroot/ROOT/default which gave no errors but did not work.

I should be able to do the same via 'zfs' so I'm wondering - what's the secret sauce to do the same from zfs?
 
You really don't want to boot into a BE and then bectl mount a different BE on the same mount point.
You get the same problems you do with every other filesystem when you mount over your running system.
Don't try to use native zfs commands. BEs are created for a reason, use the tools correctly to fix them, don't try to take shortcuts.

Example zfs list and bectl list on one of my systems.
Code:
 zfs list
NAME                          USED  AVAIL  REFER  MOUNTPOINT
zroot                        64.9G   158G    88K  /zroot
zroot/ROOT                   23.4G   158G    88K  none
zroot/ROOT/15.0-RELEASE-p10   154M   158G  14.7G  /
zroot/ROOT/15.1-RELEASE-p0      8K   158G  15.6G  /
zroot/ROOT/15.1-RELEASE-p1   23.2G   158G  15.6G  /
zroot/tmp                     184K   158G   184K  /tmp
zroot/usr                    41.4G   158G    88K  /usr
Code:
bectl list
BE               Active Mountpoint Space Created
15.0-RELEASE-p10 -      -          7.19G 2025-12-05 17:04
15.1-RELEASE-p0  -      -          498M  2026-06-30 17:01
15.1-RELEASE-p1  NR     /          23.2G 2026-06-16 10:22
I'm currently booted into 15.1-RELEASE-p1 but lets say that was broken so I rebooted and was in 15.0-RELEASE-p10.
To fix the 15.1-RELEASE-p1 BE:
bectl mount 15.1-RELEASE-p1 /mnt
vi /mnt/etc/rc.conf and fix the problem
bectl umount 15.1-RELEASE-p1
reboot
 
mer Thanks for responding. My question was how to do this via zfs. I had also tried the same using another mountpoint /media with the same results. I'll update the question to avoid any /zroot confusion.
 
To illustrate (after booting to any BE other than 'default'):

$ zfs mount -o mountpoint=/media zroot/ROOT/default
$ bectl list
libbe_init("") failed.


After this, the system is unusable.
Edit: I'll need to reboot after capturing the exact error message.

Isn't the bectl command a subset of the zfs command? If so, anything bectl mount does should also be do-able via zfs mount.
 
Code:
$ zfs mount -o mountpoint=/media zroot/ROOT/default
$ bectl list
libbe_init("") failed.


After this, the system is unusable.

The issue is that you cannot override normal dataset properties the way you were trying to. Instead, you have to use zfs-set(8) for that:
Code:
zfs set mountpoint=/media zroot/ROOT/default
zfs mount zroot/ROOT/default

UPD: Don't forget to unmount the dataset before setting mountpoint back to / (or just use the -u option with zfs-set), otherwise you'll end up with the same outcome.
 
Back
Top