Structures
From the updated manual page for bectl(8), with regard to the
-r
flag for a recursive boot environment:The traditional FreeBSD boot environment layout, as created by the Auto ZFS option to bsdinstall(8), is a shallow boot environment structure, where boot environment datasets do not have any directly subordinate datasets. Instead, they're organized off in
zroot/ROOT
, and they rely on datasets elsewhere in the pool having canmount
set to off
. For instance, a simplified pool may be laid out as such:
Code:
% zfs list -o name,canmount,mountpoint
NAME CANMOUNT MOUNTPOINT
zroot
zroot/ROOT noauto none
zroot/ROOT/default noauto none
zroot/usr off /usr
zroot/usr/home on /usr/home
zroot/var on /var
In that example, zroot/usr has
canmount
set to off
, thus files in /usr typically fall into the boot environment because this dataset is not mounted. zroot/usr/home is mounted, thus files in /usr/home are not in the boot environment.The other style of boot environment in use, frequently called deep boot environment, organizes some or all of the boot environment as subordinate to the boot environment dataset. For example:
Code:
% zfs list -o name,canmount,mountpoint
NAME CANMOUNT MOUNTPOINT
zroot
zroot/ROOT noauto none
zroot/ROOT/default noauto none
zroot/ROOT/default/usr noauto /usr
zroot/ROOT/default/usr/local noauto /usr/local
zroot/var on /var
Note that the subordinate datasets now have
canmount
set to noauto
. These are more obviously a part of the boot environment, as indicated by their positioning in the layout. These subordinate datasets will be mounted by the zfsbe rc(8) script at boot time. In this example, /var is excluded from the boot environment.bectl commands that have their own
-r
operate on this second, deep style of boot environment, when the -r
flag is set. A future version of bectl may default to handling both styles and deprecate the various -r
flags.The update:
{link removed}
2017 discussion:

ZFS - Why are /usr and /var not in a boot environment?
By default the file system structure was set up as is set up so that /usr and /var are not inside a boot environment dataset and have canmount set to off. $ zfs list -H -o name,mountpoint,canmount NAME MOUNTPOINT CANMOUNT s${ZROOT}/ROOT none on ${ZROOT}/ROOT/default /...
Last edited: