ZFS root on ZFS in partition - activate boot environments

Hi all,

I have a FreeBSD installation in a partition on my laptop (besides Windows 11).
The system just runs in a single ZFS pool:
Code:
root@elfreebsdo1:~ # zpool list
NAME   SIZE  ALLOC   FREE  CKPOINT  EXPANDSZ   FRAG    CAP  DEDUP    HEALTH  ALTROOT
root   816G   109G   707G        -         -    10%    13%  1.00x    ONLINE  -
While having some problems, I noticed that I cannot make use of boot environments:
Code:
root@elfreebsdo1:~ # bectl list
libbe_init("") failed.
Is there any non-destructive operation, how I can enable boot environments in my system?
 
Can you please post the output of:

Code:
ldd /sbin/bectl
ldd /lib/libbe.so.1
Code:
root@elfreebsdo1:~ # ldd /sbin/bectl
/sbin/bectl:
    libbe.so.1 => /lib/libbe.so.1 (0x17ebc664b000)
    libjail.so.1 => /lib/libjail.so.1 (0x17ebc844f000)
    libnvpair.so.2 => /lib/libnvpair.so.2 (0x17ebc783e000)
    libspl.so.2 => /lib/libspl.so.2 (0x17ebc99c4000)
    libutil.so.9 => /lib/libutil.so.9 (0x17ebc87c6000)
    libzfsbootenv.so.1 => /lib/libzfsbootenv.so.1 (0x17ebc918e000)
    libc.so.7 => /lib/libc.so.7 (0x17ebcbaa1000)
    libzfs.so.4 => /lib/libzfs.so.4 (0x17ebc9ca6000)
    libavl.so.2 => /lib/libavl.so.2 (0x17ebca1b6000)
    libbsdxml.so.4 => /lib/libbsdxml.so.4 (0x17ebca4d5000)
    libcrypto.so.30 => /lib/libcrypto.so.30 (0x17ebca7f2000)
    libgeom.so.5 => /lib/libgeom.so.5 (0x17ebcd3ac000)
    libm.so.5 => /lib/libm.so.5 (0x17ebcc3af000)
    libmd.so.6 => /lib/libmd.so.6 (0x17ebcde34000)
    librt.so.1 => /lib/librt.so.1 (0x17ebce57a000)
    libumem.so.2 => /lib/libumem.so.2 (0x17ebce882000)
    libuutil.so.2 => /lib/libuutil.so.2 (0x17ebcf7d5000)
    libz.so.6 => /lib/libz.so.6 (0x17ebd0633000)
    libzfs_core.so.2 => /lib/libzfs_core.so.2 (0x17ebd2386000)
    libzutil.so.2 => /lib/libzutil.so.2 (0x17ebd15ef000)
    libthr.so.3 => /lib/libthr.so.3 (0x17ebd3d39000)
    libsbuf.so.6 => /lib/libsbuf.so.6 (0x17ebd27a6000)
    libtpool.so.2 => /lib/libtpool.so.2 (0x17ebd3184000)
    [vdso] (0x17ebc5b19000)
root@elfreebsdo1:~ # ldd /lib/libbe.so.1
/lib/libbe.so.1:
    libzfs.so.4 => /lib/libzfs.so.4 (0x192f14493000)
    libnvpair.so.2 => /lib/libnvpair.so.2 (0x192f156c1000)
    libspl.so.2 => /lib/libspl.so.2 (0x192f16df8000)
    libzfsbootenv.so.1 => /lib/libzfsbootenv.so.1 (0x192f16020000)
    libc.so.7 => /lib/libc.so.7 (0x192f15277000)
    libavl.so.2 => /lib/libavl.so.2 (0x192f16ffc000)
    libbsdxml.so.4 => /lib/libbsdxml.so.4 (0x192f172c6000)
    libcrypto.so.30 => /lib/libcrypto.so.30 (0x192f1856e000)
    libgeom.so.5 => /lib/libgeom.so.5 (0x192f180cc000)
    libm.so.5 => /lib/libm.so.5 (0x192f18b07000)
    libmd.so.6 => /lib/libmd.so.6 (0x192f1980c000)
    librt.so.1 => /lib/librt.so.1 (0x192f19c2d000)
    libumem.so.2 => /lib/libumem.so.2 (0x192f1aa66000)
    libutil.so.9 => /lib/libutil.so.9 (0x192f1aea6000)
    libuutil.so.2 => /lib/libuutil.so.2 (0x192f1be74000)
    libz.so.6 => /lib/libz.so.6 (0x192f1d294000)
    libzfs_core.so.2 => /lib/libzfs_core.so.2 (0x192f1c208000)
    libzutil.so.2 => /lib/libzutil.so.2 (0x192f1d1a4000)
    libthr.so.3 => /lib/libthr.so.3 (0x192f1e317000)
    libsbuf.so.6 => /lib/libsbuf.so.6 (0x192f1d94b000)
    libtpool.so.2 => /lib/libtpool.so.2 (0x192f1f72d000)
root@elfreebsdo1:~ #
 
I think that you have not a default ZFS dataset layout so that you can't use bectl tool, can you post ZFS list cmd output? Did you made ZFS configuration on your own rather than letting the installer to do it?
 
I think that you have not a default ZFS dataset layout so that you can't use bectl tool, can you post ZFS list cmd output?
Code:
root@elfreebsdo1:~ # zfs list
NAME                             USED  AVAIL  REFER  MOUNTPOINT
root                             108G   682G   105G  /mnt
root/poudriere                  1.95G   682G    24K  /mnt/poudriere
root/poudriere/data              180M   682G    29K  /usr/local/poudriere/data
root/poudriere/data/.m            24K   682G    24K  /usr/local/poudriere/data/.m
root/poudriere/data/cache        190K   682G   190K  /usr/local/poudriere/data/cache
root/poudriere/data/images        24K   682G    24K  /usr/local/poudriere/data/images
root/poudriere/data/logs        3.37M   682G  3.37M  /usr/local/poudriere/data/logs
root/poudriere/data/packages     177M   682G   177M  /usr/local/poudriere/data/packages
root/poudriere/data/wrkdirs       24K   682G    24K  /usr/local/poudriere/data/wrkdirs
root/poudriere/jails            1.44G   682G    24K  /mnt/poudriere/jails
root/poudriere/jails/141Ramd64  1.44G   682G  1.44G  /usr/local/poudriere/jails/141Ramd64
root/poudriere/ports             337M   682G    24K  /mnt/poudriere/ports
root/poudriere/ports/default     337M   682G   337M  /usr/local/poudriere/ports/default
root/vm                         1.70G   682G  1.70G  /mnt/vm
root/vm/aerynos                   28K   682G    28K  /mnt/vm/aerynos
root@elfreebsdo1:~ #
 
Code:
root@elfreebsdo1:~ # zfs list
NAME                             USED  AVAIL  REFER  MOUNTPOINT
root                             108G   682G   105G  /mnt
root/poudriere                  1.95G   682G    24K  /mnt/poudriere
root/poudriere/data              180M   682G    29K  /usr/local/poudriere/data
root/poudriere/data/.m            24K   682G    24K  /usr/local/poudriere/data/.m
root/poudriere/data/cache        190K   682G   190K  /usr/local/poudriere/data/cache
root/poudriere/data/images        24K   682G    24K  /usr/local/poudriere/data/images
root/poudriere/data/logs        3.37M   682G  3.37M  /usr/local/poudriere/data/logs
root/poudriere/data/packages     177M   682G   177M  /usr/local/poudriere/data/packages
root/poudriere/data/wrkdirs       24K   682G    24K  /usr/local/poudriere/data/wrkdirs
root/poudriere/jails            1.44G   682G    24K  /mnt/poudriere/jails
root/poudriere/jails/141Ramd64  1.44G   682G  1.44G  /usr/local/poudriere/jails/141Ramd64
root/poudriere/ports             337M   682G    24K  /mnt/poudriere/ports
root/poudriere/ports/default     337M   682G   337M  /usr/local/poudriere/ports/default
root/vm                         1.70G   682G  1.70G  /mnt/vm
root/vm/aerynos                   28K   682G    28K  /mnt/vm/aerynos
root@elfreebsdo1:~ #
Yeah, like what I thought. You need at least something like that for your root dataset, but search about it in the forums, there are may be solutions for you because I must have read a issue like this on the forums before. That's why I thought like this.

Like you need something like:
zroot/ROOT/default for / mount point.
 
Yeah, like what I thought. You need at least something like that for your root dataset, but search about it in the forums, there are may be solutions for you because I must have read a issue like this on the forums before. That's why I thought like this.

Like you need something like:
zroot/ROOT/default for / mount point.
I fear, I'd need to reinstall from scratch to fix the layout?
 
Here you go mate, I found the original thread.

Thanks a lot!
At a first glance it looks as if I'd need to backup and perform a manual installation creating the correct pool layout.
Maybe I gonna dig into this.
 
Thanks a lot!
At a first glance it looks as if I'd need to backup and perform a manual installation creating the correct pool layout.
Maybe I gonna dig into this.
I'd recommend you to try this first. Otherwise you can do the reinstall with backupped snapshot way.

 
Back
Top