Re: Good practices with bectl

From: Nuno Teixeira <eduardo_at_freebsd.org>
Date: Sat, 24 Sep 2022 17:08:54 UTC
And src/tools/build/beinstall.sh too!

beinstall.sh is just great:
`bectl list`:
---
 BE                           Active Mountpoint Space Created
 14.0-CURRENT-20220924.142841 NR     /          110G  2022-09-24 17:48
 default                      -      -          2.41G 2021-07-06 11:03
---

Cheers

Daniel Tameling <tamelingdaniel@gmail.com> escreveu no dia sábado,
24/09/2022 à(s) 14:47:

> On Wed, Sep 21, 2022 at 12:08:38PM +0100, Nuno Teixeira wrote:
> > Summary: Using bectl for upgrades
> >
> > RELEASE=Whatever
> > > bectl create ${RELEASE}
> > > bectl mount ${RELEASE}
> > BASEDIR=/tmp/be_mount.XXXX # Use mount point returned by bectl mount
> >
> > [freebsd-update method]
> > > freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update \
> > upgrade -r ${RELEASE}
> > > freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update
> install
> > # Ignore admonitions to reboot, since we're using a boot environment
> > > freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update
> install
> > > bectl activate ${RELEASE}
> > #> bectl activate -t ${RELEASE} # Failsafe (if the machine is too far
> away
> > to simply walk over and
> > switch to the old BE):
> > > reboot
> >
> > [upgrade from source method]
> > > make DESTDIR=${BASEDIR} installkernel
> > > etcupdate -p -D $BASEDIR
> > > make DESTDIR=${BASEDIR} installworld
> > > etcupdate -D $BASEDIR
> > > make DESTDIR=${BASEDIR} -DBATCH_DELETE_OLD_FILES delete-old
> > delete-old-libs
> > > bectl activate ${RELEASE}
> > #> bectl activate -t ${RELEASE} # Failsafe (if the machine is too far
> away
> > to simply walk over and
> > switch to the old BE):
> > > reboot
> >
>
> Would it be possible to add this to the handbook? I know that I will be
> looking for it when I upgrade next time.
>
> Best regards,
> Daniel
>
>

-- 
Nuno Teixeira
FreeBSD Committer (ports)