How To Use beadm to Upgrade FreeBSD installed in a ZFS Boot Environment, with minimal downtime

Building World & Kernel

Time to run the build and install world and kernel processes, not going to go through these commands in depth here. I am expecting that you already are familiar with them.

cd /jails/devel/ROOT/usr/src
make buildworld
make buildkernel
make installkernel
make installworld
mergemaster -Ui -m /jails/devel/ROOT/usr/src -D /jails/devel/ROOT
make -DBATCH_DELETE_OLD_FILES delete-old

Note:  If your seeing this, and thinking I missed another delete file step, don't worry that's intentional it will be done later.

Before continuing the environment variables previously set need to be unset. As before I keep a file saved /jails/devel/unsetbuild.env which contains the commands to to this that I can copy and paste into the console.

cd /jails/devel
cat /jails/devel/unsetbuild.env
# Unset Jail Environment Build Options
unsetenv MAKEOBJDIRPREFIX
unsetenv DESTDIR
unsetenv __MAKE_CONF
unsetenv SRCCONF
umount /jails/devel/ROOT/usr/src