User Tools

Site Tools


pkg_current

Upgrading a base package install from 15.1-RELEASE to 16-CURRENT

This is the general procedure I have in mind:

  create an old boot environment, in case we want to roll back in future
  create a new boot environment, to install into
  mount it, and do the install
  do the upgrade of the base system packages inside this BE
  do the upgrade of ports tree packages
  outside the BE, update the (UEFI) boot loader for 16
  reboot
  # bectl create fifteen
  # bectl create current
  # bectl mount current /mnt
  # cd /mnt
  # mount -t devfs devfs dev
  # mount -t tmpfs tmpfs tmp
  # chroot .

We’re now in the chroot! This mostly worked as expected, apart from the path for signature verification being different between versions.

The fingerprints setting used in /etc/pkg/FreeBSD.conf are different between what’s required for a release, and current.

We need to install prior, what would be installed during a 16-CURRENT update, beforehand, or the signatures don’t work. Let’s fetch the config from git, and make sure we have no other external configurations lurking.

 # fetch -o /etc/pkg/FreeBSD.conf https://cgit.freebsd.org/src/plain/usr.sbin/pkg/FreeBSD.conf.latest
 # rm -f /usr/local/etc/pkg/repos/*
 # echo 'FreeBSD-base:  { enabled: yes }' | tee /usr/local/etc/pkg/repos/FreeBSD.conf
 # pkg-static -o IGNORE_OSVERSION=yes -o ABI=FreeBSD:16:amd64 update
 # pkg-static -o IGNORE_OSVERSION=yes -o ABI=FreeBSD:16:amd64 upgrade -r FreeBSD-base
 # pkg-static -o IGNORE_OSVERSION=yes -o ABI=FreeBSD:16:amd64 upgrade -r FreeBSD-ports
 # exit

Now let’s do the boot loader. The 16-CURRENT boot loader should be capable of loading 15.0-RELEASE without issue, You’ll likely need to use efibootmgr(8) to handle this.

 # cp -av /mnt/boot/loader.efi /boot/efi/EFI/FreeBSD/current.efi
 # bectl activate current

This was copied from https://people.freebsd.org/~dch/posts/2026-01-18-upgrading-base-packages-to-current/ with a few edits as I don't use boot environments.

pkg_current.txt · Last modified: by chris

Except where otherwise noted, content on this wiki is licensed under the following license: Public Domain
Public Domain Donate Powered by PHP Valid HTML5 Valid CSS Driven by DokuWiki