Solved Adding an upgraded boot env to an existing install

Hello all,

I'm trying to update one of my NAS boxes to test running it on 15.1. I am currently running zVault, which is based on the FreeBSD 13.3.

So I was following vermaden's blog post, which is from 2021, but seemed to be reasonable. Basically, it calls for creating a new boot environment, mount it somewhere, and then untar the base.tgz, kernel.tgz, and lib32.tgz tarballs into this dataset. I copy over files from the current BE, activate the new BE ("default"), and reboot. When I do the reboot, it gets to the bootloader, and then hangs at the mountroot> prompt. When I enter the path to the BE at the prompt (zfs:freenas-boot/ROOT/default), however it fails yet again, as in the attached image.

I almost feel as if I missed some setting, but have no idea where it would be. So if I cannot get this to work, my next option would be to build 15.1 on a separate hard drive, pull the old drive, and then start using the new one. Is a different hard drive the best approach or is there a way to get the new BE on the original disk doable?
 

Attachments

  • Screenshot 2026-10-22 at 15.47.04.png
    Screenshot 2026-10-22 at 15.47.04.png
    94.1 KB · Views: 14
When you copied the files from current BE, did you include /boot/loader.conf among others?

You could test this too: stop it in boot prompt, (the OK prompt), do
Code:
unload all
load /boot/kernel/kernel
load /boot/kernel/zfs.ko
boot

I'd avoid calling it default, seems confusing.
 
is the zfs kernel module loaded ?
And there it is. In FreeBSD 13, the kernel module was called openzfs.ko, instead of zfs.ko, so on reboot the system was looking for the wrong module, couldn't load zfs, thus couldn't load the pool.

I'd avoid calling it default, seems confusing.
Thing is that the primary BE on 14/15 boxes is called default (at least in my experience). When freebsd-update updates the BE, the process is to copy default to the old release name, then upgrading default. Since I am moving to 15.1, I am basically adopting this approach as well. My current list looks like

Code:
BE                                Active Mountpoint Space Created
15.1-RELEASE-p4_2026-10-15_192504 -      -          60.1M 2026-10-15 19:25
15.1-RELEASE-p5_2026-10-22_111418 -      -          50.2M 2026-10-22 11:14
Before_pkgUpgrade                 -      -          1.78M 2026-10-22 12:26
default                           NR     /          94.5G 2026-06-03 08:15
 
Thing is that the primary BE on 14/15 boxes is called default (at least in my experience). When freebsd-update updates the BE, the process is to copy default to the old release name, then upgrading default. Since I am moving to 15.1, I am basically adopting this approach as well. My current list looks like
A BE for saving the system before it is updated is created from the active BE, not from a BE named 'default'.
The command is simply:
bectl create -r ${VERSION}_${TIMESTAMP}

A BE is somewhat like an index in a book, nothing is copied at first and until something changes in the BE it comes from.
 
A BE for saving the system before it is updated is created from the active BE, not from a BE named 'default'.
The command is simply:
bectl create -r ${VERSION}_${TIMESTAMP}

You are correct. but default is always my active BE. It was recommended to me to do it this way by Allan Jude back in 2019. I was doing it the other way, which was to create a new BE, boot into it, then do the upgrade (freebsd-update or pkg upgrade). Allan recommended to do it the other way 'round.

A BE is somewhat like an index in a book, nothing is copied at first and until something changes in the BE it comes from.
Correct, which is why both freebsd-update my pkg-upgrade playbook do a bectl create before making changes to the default BE...
 
Back
Top