From nobody Sat Sep 24 17:08:54 2022 X-Original-To: freebsd-current@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4MZb8g1dtHz4d5xH for ; Sat, 24 Sep 2022 17:09:07 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4MZb8g19c7z3NgK for ; Sat, 24 Sep 2022 17:09:07 +0000 (UTC) (envelope-from eduardo@freebsd.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664039347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+OiLkNfvbxepCcTlB8/ajGtf1AGDrouwbAFVbORfDaQ=; b=B/5NiC+EMtPsmvcf5DflZMU0joM1FYL4UMvYqfhBLBRAsAf+a/Api3LzsDCc+blBX9CFQ5 mhOlXxzWejEgSpo5gpYR50WbOH10NO7R9f71Pn8UppOvLA9bfWWMGyeOk2ICd3eoVAPCBC S9hfqRF+GG9pNDXNMZv7y57B0KpL6/nkJMJZEuvNOTaikV6U2XTKAXvXt16AzzWbM1Qr6f 7q+W5QkuwsKBZ795d834yYiGr8OHj0DM9qj+1GCucYay8BlVUEGwhxWdm4oTdfxF+9UF/i K8I3qdDep8o0Uafl5fTzrd7+FAmVkBtNQ7uRYakwWEWKJmgD6I7BdSAnI+nDPQ== Received: from mail-vs1-f42.google.com (mail-vs1-f42.google.com [209.85.217.42]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (2048 bits) client-digest SHA256) (Client CN "smtp.gmail.com", Issuer "GTS CA 1D4" (verified OK)) (Authenticated sender: eduardo) by smtp.freebsd.org (Postfix) with ESMTPSA id 4MZb8f753yzXL4 for ; Sat, 24 Sep 2022 17:09:06 +0000 (UTC) (envelope-from eduardo@freebsd.org) Received: by mail-vs1-f42.google.com with SMTP id 63so2846621vse.2 for ; Sat, 24 Sep 2022 10:09:06 -0700 (PDT) X-Gm-Message-State: ACrzQf0pgxsbS4eqUiYzOPDPOO4vJAa6w6CAbXQyH+0MX20KLcTDkmF0 bL9z/tLBcSZLuBLhT+ss4522ZFHpEQ4QNYsruMU= X-Google-Smtp-Source: AMsMyM7UWRS/HYBVq2Lix+nLh2cNgohkpSVuWNvpeL+WsWoHD1Mhd4xRd3nY+j5HfciFgXBr4357Id0g7Ku5n8DSxo4= X-Received: by 2002:a67:d793:0:b0:398:506b:747b with SMTP id q19-20020a67d793000000b00398506b747bmr5501042vsj.19.1664039346191; Sat, 24 Sep 2022 10:09:06 -0700 (PDT) List-Id: Discussions about the use of FreeBSD-current List-Archive: https://lists.freebsd.org/archives/freebsd-current List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-freebsd-current@freebsd.org MIME-Version: 1.0 References: <20220921112706.Horde.eNaqpvIqq64Qe7crIQQ9JwX@webmail.leidinger.net> <20220921124452.Horde.BSQPZ4imQhhKUUE0k3W5iFb@webmail.leidinger.net> In-Reply-To: From: Nuno Teixeira Date: Sat, 24 Sep 2022 18:08:54 +0100 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: Good practices with bectl To: FreeBSD CURRENT Content-Type: multipart/alternative; boundary="0000000000001f454805e96f5ad7" ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1664039347; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: in-reply-to:in-reply-to:references:references; bh=+OiLkNfvbxepCcTlB8/ajGtf1AGDrouwbAFVbORfDaQ=; b=ssNWag6vKeDUOF20lIU4syd22cbff79+XUlwJb8Hf1Elhv3SgRIU2XCdb94my9GqNWnoSk IxSgwzXtkXN5fjbKHhWfWAeyKrKJOFjdCH7eNaHV31Bj9ajATeDx807MRN9gmtvGso8Im/ zE8WHOJqcFCYsjK93saEko0HH7PzJFO5Xe86wW7AUm5d5xqUfYljjXVGbZ51v/Z7/NYE0z UsQpGOJIrfJFVseFhlEcHSssQqiMv8Q2v/N9vEp4cnMpqqAWe8r/LFxR3VvkJT+41hPhyh QsrZAW7rg0m9TwbcIqEfrstbpMk5tHHh9geWPKjHzHqv94WlmyjkK+VgW1j8zA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1664039347; a=rsa-sha256; cv=none; b=VBj/InKRRdNHMfKxm+6nKNo3lDsI+1vTqEehSY6hRl2Q4VeAGoFGbCMm7GgQhd3MnuSNXw 0hk22P/ImErXymR6IeVLnblkeYwW4vm3+YGMg8/AYrHtNBRC8Ks6/zZiUtc8Hlz6OaOQu8 mpZbfpnZyuT6DiHQPT+0zVGo0UQegVmTGNc0nVCqup7DmrI9LyZx8FtvM5jLUiYAt2rg5W /6SS6vPcJYmvIMjYxvBmetFagSTipFajbqQSRfrALrjTMlau15DO7Tjgraem9WVlZ6JGje 4yEY8ehD9cQ8M2yBJNKugjm/e9YpMW8i8jZp6da5+JVMJ62bYWyR+81LnrGSKg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N --0000000000001f454805e96f5ad7 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable 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 escreveu no dia s=C3=A1bado, 24/09/2022 =C3=A0(s) 14:47: > On Wed, Sep 21, 2022 at 12:08:38PM +0100, Nuno Teixeira wrote: > > Summary: Using bectl for upgrades > > > > RELEASE=3DWhatever > > > bectl create ${RELEASE} > > > bectl mount ${RELEASE} > > BASEDIR=3D/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=3D${BASEDIR} installkernel > > > etcupdate -p -D $BASEDIR > > > make DESTDIR=3D${BASEDIR} installworld > > > etcupdate -D $BASEDIR > > > make DESTDIR=3D${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 > > --=20 Nuno Teixeira FreeBSD Committer (ports) --0000000000001f454805e96f5ad7 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
And src/tools/build/beinstall.sh too!

<= /div>
beinstall.sh is just great:
`bectl list`:
---=
=C2=A0BE =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 Active Mountpoint Space Created=C2=A014.0-CURRENT-20220924.142841 NR =C2=A0 =C2=A0 / =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =C2=A0110G =C2=A02022-09-24 17:48
=C2=A0default =C2=A0 =C2=A0= =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0- =C2=A0 =C2= =A0 =C2=A0- =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A02.41G 2021-07-06 11:03
<= div>---

Cheers

Daniel Tameling <tamelingdaniel@gmail.com> escr= eveu no dia s=C3=A1bado, 24/09/2022 =C3=A0(s) 14:47:
On Wed, Sep 21, 2022 at 12:08:38PM +01= 00, Nuno Teixeira wrote:
> Summary: Using bectl for upgrades
>
> RELEASE=3DWhatever
> > bectl create ${RELEASE}
> > bectl mount ${RELEASE}
> BASEDIR=3D/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 environme= nt
> > freebsd-update -b ${BASEDIR} -d ${BASEDIR}/var/db/freebsd-update = install
> > bectl activate ${RELEASE}
> #> bectl activate -t ${RELEASE} # Failsafe (if the machine is too f= ar away
> to simply walk over and
> switch to the old BE):
> > reboot
>
> [upgrade from source method]
> > make DESTDIR=3D${BASEDIR} installkernel
> > etcupdate -p -D $BASEDIR
> > make DESTDIR=3D${BASEDIR} installworld
> > etcupdate -D $BASEDIR
> > make DESTDIR=3D${BASEDIR} -DBATCH_DELETE_OLD_FILES delete-old
> delete-old-libs
> > bectl activate ${RELEASE}
> #> bectl activate -t ${RELEASE} # Failsafe (if the machine is too f= ar 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 loo= king for it when I upgrade next time.

Best regards,
Daniel



--
Nun= o Teixeira
FreeBSD Committer (ports)
--0000000000001f454805e96f5ad7--