dch revised this gist . Go to revision
1 file changed, 14 insertions, 6 deletions
pkg15-current.md
| @@ -1,16 +1,17 @@ | |||
| 1 | 1 | # Upgrading a 15.0-RELEASE base package install to 16-CURRENT | |
| 2 | 2 | ||
| 3 | - | I know, 15.0-RELEASE has been out now for over a month, | |
| 4 | - | and we're already bored. | |
| 3 | + | I know, 15.0-RELEASE has been out now for over a month, and I'm easily bored. Obviously, it's time to switch back to running 16-CURRENT with whatever random patches I am working on atm. | |
| 5 | 4 | ||
| 6 | - | It's time to switch back to running 16-CURRENT with | |
| 7 | - | whatever random patches I am working on atm. | |
| 5 | + | This is the general procedure: | |
| 8 | 6 | ||
| 9 | 7 | - create an old environment | |
| 10 | 8 | - create a new boot environment | |
| 11 | 9 | - mount it | |
| 12 | - | - finagle the pkg settings | |
| 13 | - | - do the upgrade | |
| 10 | + | - finagle package signatures | |
| 11 | + | - do the upgrade of the base system packages | |
| 12 | + | - do the upgrade of ports tree packages | |
| 13 | + | - update the (UEFI) boot loader for 16 | |
| 14 | + | - reboot & profit | |
| 14 | 15 | ||
| 15 | 16 | ``` | |
| 16 | 17 | # bectl create fifteen | |
| @@ -43,3 +44,10 @@ update, beforehand, or the signatures don't work. | |||
| 43 | 44 | # exit | |
| 44 | 45 | ``` | |
| 45 | 46 | ||
| 47 | + | Now let's do the boot loader. The 16-CURRENT boot loader should be capable of loading 15.0-RELEASE without issue, but I use [rEFInd](https://www.rodsbooks.com/refind/) a custom EFI boot loader that allows me to choose between different loaders on startup. You'll likely need to use [efibootmgr(8)](https://man.freebsd.org/efibootmgr) to handle this. | |
| 48 | + | ||
| 49 | + | ``` | |
| 50 | + | # cp -av /mnt/boot/loader.efi /boot/efi/EFI/FreeBSD/current.efi | |
| 51 | + | ``` | |
| 52 | + | ||
| 53 | + | Let's reboot! | |
dch revised this gist . Go to revision
1 file changed, 45 insertions
pkg15-current.md(file created)
| @@ -0,0 +1,45 @@ | |||
| 1 | + | # Upgrading a 15.0-RELEASE base package install to 16-CURRENT | |
| 2 | + | ||
| 3 | + | I know, 15.0-RELEASE has been out now for over a month, | |
| 4 | + | and we're already bored. | |
| 5 | + | ||
| 6 | + | It's time to switch back to running 16-CURRENT with | |
| 7 | + | whatever random patches I am working on atm. | |
| 8 | + | ||
| 9 | + | - create an old environment | |
| 10 | + | - create a new boot environment | |
| 11 | + | - mount it | |
| 12 | + | - finagle the pkg settings | |
| 13 | + | - do the upgrade | |
| 14 | + | ||
| 15 | + | ``` | |
| 16 | + | # bectl create fifteen | |
| 17 | + | # bectl create current | |
| 18 | + | # bectl activate current | |
| 19 | + | # bectl mount current /mnt | |
| 20 | + | # cd /mnt | |
| 21 | + | # mount -t devfs devfs dev | |
| 22 | + | # mount -t tmpfs tmpfs tmp | |
| 23 | + | # chroot . | |
| 24 | + | ``` | |
| 25 | + | ||
| 26 | + | We're now in the chroot! | |
| 27 | + | ||
| 28 | + | The `fingerprints` setting used in `/etc/pkg/FreeBSD.conf` are | |
| 29 | + | different between what's required for a | |
| 30 | + | [release](https://cgit.freebsd.org/src/tree/usr.sbin/pkg), and | |
| 31 | + | [current](https://cgit.freebsd.org/src/plain/usr.sbin/pkg/FreeBSD.conf.latest). | |
| 32 | + | ||
| 33 | + | We need to fetch what would be installed during a 16-CURRENT | |
| 34 | + | update, beforehand, or the signatures don't work. | |
| 35 | + | ||
| 36 | + | ``` | |
| 37 | + | # fetch -o /etc/pkg/FreeBSD.conf https://cgit.freebsd.org/src/plain/usr.sbin/pkg/FreeBSD.conf.latest | |
| 38 | + | # rm -f /usr/local/etc/pkg/repos/* | |
| 39 | + | # echo 'FreeBSD-base: { enabled: yes }' | tee /usr/local/etc/pkg/repos/FreeBSD.conf | |
| 40 | + | # pkg-static -o IGNORE_OSVERSION=yes -o ABI=FreeBSD:16:amd64 update | |
| 41 | + | # pkg-static -o IGNORE_OSVERSION=yes -o ABI=FreeBSD:16:amd64 upgrade -r FreeBSD-base | |
| 42 | + | # pkg-static -o IGNORE_OSVERSION=yes -o ABI=FreeBSD:16:amd64 upgrade -r FreeBSD-ports | |
| 43 | + | # exit | |
| 44 | + | ``` | |
| 45 | + | ||