Updating FreeBSD 15.0 to FreeBSD 15.1 (via pkgbase)

I decided that Thursday morning at 8:27 AM was the right time to start my first update from FreeBSD 15.0 to 15.1 – all my hosts are now on pkgbase. I used the pgkbasify script. Now it’s time to update again.

In this post:

In the following sections, I am showing the steps I carried out. The section names here have the same names as the instructions.

Is it really pkgbase?

As seen under Introduction, I will be following the Upgrading with Base System Packages instructions:

[12:31 nagios04 dvl ~] % pkg which /usr/bin/uname
/usr/bin/uname was installed by package FreeBSD-runtime-15.0p11

Snapshot the Current Installation

I create a new boot environment; this is the fallback position.

[12:33 nagios04 root ~] # bectl create -r pre-15.1
[12:33 nagios04 root ~] # 

Upgrade the Installed System

[12:33 nagios04 root ~] # pkg upgrade -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
FreeBSD-base is up to date.
Checking for upgrades (1 candidates): 100%
Processing candidates (1 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.

Upgrade the Base System

The main thing to take note of in the paste below, this removal. Everything else seems OK. Turns out, it was of no consequence

Installed packages to be REMOVED:
	FreeBSD-lldb-dev: 15.0

The full output is in this gist.

[12:34 nagios04 root ~] # pkg -oABI=FreeBSD:15:$(uname -p) -oOSVERSION=1501000 upgrade -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
pkg: Repository FreeBSD-base has a wrong packagesite, need to re-create database
Fetching meta.conf: 100%     179 B   0.2 kB/s    00:01    
Fetching data: 100%    82 KiB  84.0 kB/s    00:01    
Processing entries: 100%
FreeBSD-base repository update completed. 509 packages processed.
FreeBSD-base is up to date.
Checking for upgrades (486 candidates): 100%
Processing candidates (486 candidates): 100%
The following 499 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	FreeBSD-pam: 15.1 [FreeBSD-base]
	FreeBSD-pam-dbg: 15.1 [FreeBSD-base]
	FreeBSD-pam-dbg-lib32: 15.1 [FreeBSD-base]
	FreeBSD-pam-dev: 15.1 [FreeBSD-base]
	FreeBSD-pam-dev-lib32: 15.1 [FreeBSD-base]
	FreeBSD-pam-lib: 15.1 [FreeBSD-base]
	FreeBSD-pam-lib32: 15.1 [FreeBSD-base]
	FreeBSD-zstd: 15.1 [FreeBSD-base]
	FreeBSD-zstd-dbg: 15.1 [FreeBSD-base]
	FreeBSD-zstd-dbg-lib32: 15.1 [FreeBSD-base]
	FreeBSD-zstd-dev: 15.1 [FreeBSD-base]
	FreeBSD-zstd-dev-lib32: 15.1 [FreeBSD-base]
	FreeBSD-zstd-lib: 15.1 [FreeBSD-base]
	FreeBSD-zstd-lib32: 15.1 [FreeBSD-base]

Installed packages to be UPGRADED:
	FreeBSD-acct: 15.0 -> 15.1 [FreeBSD-base]
	FreeBSD-acct-dbg: 15.0 -> 15.1 [FreeBSD-base]
	FreeBSD-acpi: 15.0 -> 15.1 [FreeBSD-base]
...
	FreeBSD-zlib-lib32: 15.0 -> 15.1 [FreeBSD-base]
	FreeBSD-zoneinfo: 15.0p7 -> 15.1 [FreeBSD-base]

Number of packages to be installed: 14
Number of packages to be upgraded: 485

The process will require 12 MiB more space.
672 MiB to be downloaded.

Proceed with this action? [y/N]: y
[  1/499] Fetching FreeBSD-libmilter-dev-15.1: 100%    86 KiB  87.8 kB/s    00:01    
...
[499/499] Fetching FreeBSD-ctf-dev-15.1: 100%   138 KiB 141.1 kB/s    00:01    
Checking integrity... done (24 conflicting)
  - FreeBSD-sound-15.1 [FreeBSD-base] conflicts with FreeBSD-rc-15.0 [installed] on /etc/rc.d/mixer
  - FreeBSD-atf-15.1 [FreeBSD-base] conflicts with FreeBSD-tests-15.0p11 [installed] on /usr/share/atf/libatf-sh.subr
  - FreeBSD-pam-dbg-lib32-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-dbg-lib32-15.0p11 [installed] on /usr/lib/debug/usr/lib32/libpam.so.6.debug
  - FreeBSD-pam-dbg-lib32-15.1 [FreeBSD-base] conflicts with FreeBSD-utilities-dbg-lib32-15.0p11 [installed] on /usr/lib/debug/usr/lib32/pam_chroot.so.6.debug
  - FreeBSD-zstd-15.1 [FreeBSD-base] conflicts with FreeBSD-utilities-15.0p11 [installed] on /usr/bin/unzstd
  - FreeBSD-pam-dbg-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-dbg-15.0p11 [installed] on /usr/lib/debug/usr/lib/libpam.so.6.debug
  - FreeBSD-pam-dbg-15.1 [FreeBSD-base] conflicts with FreeBSD-utilities-dbg-15.0p11 [installed] on /usr/lib/debug/usr/lib/pam_chroot.so.6.debug
  - FreeBSD-clang-15.1p1 [FreeBSD-base] conflicts with FreeBSD-lldb-15.0p11 [installed] on /usr/lib/libprivatelldb.so.19
  - FreeBSD-pam-lib-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-15.0p11 [installed] on /usr/lib/libpam.so.6
  - FreeBSD-zstd-dev-lib32-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-dev-lib32-15.0p11 [installed] on /usr/lib32/libprivatezstd.a
  - FreeBSD-pam-lib32-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-lib32-15.0p11 [installed] on /usr/lib32/libpam.so.6
  - FreeBSD-pam-lib32-15.1 [FreeBSD-base] conflicts with FreeBSD-utilities-lib32-15.0p11 [installed] on /usr/lib32/pam_chroot.so
  - FreeBSD-zstd-lib32-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-lib32-15.0p11 [installed] on /usr/lib32/libprivatezstd.so.5
  - FreeBSD-zstd-lib-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-15.0p11 [installed] on /usr/lib/libprivatezstd.so.5
  - FreeBSD-pam-dev-lib32-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-dev-lib32-15.0p11 [installed] on /usr/lib32/libpam.a
  - FreeBSD-zstd-dbg-lib32-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-dbg-lib32-15.0p11 [installed] on /usr/lib/debug/usr/lib32/libprivatezstd.so.5.debug
  - FreeBSD-clang-dbg-15.1p1 [FreeBSD-base] conflicts with FreeBSD-lldb-dbg-15.0p11 [installed] on /usr/lib/debug/usr/lib/libprivatelldb.so.19.debug
  - FreeBSD-clang-dev-15.1p1 [FreeBSD-base] conflicts with FreeBSD-lldb-dev-15.0 [installed] on /usr/lib/libprivatelldb.so
  - FreeBSD-zstd-dev-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-dev-15.0p11 [installed] on /usr/include/private/zstd/zstd.h
  - FreeBSD-pam-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-15.0p11 [installed] on /etc/pam.d/README
  - FreeBSD-pam-15.1 [FreeBSD-base] conflicts with FreeBSD-utilities-15.0p11 [installed] on /usr/lib/pam_chroot.so
  - FreeBSD-zstd-dbg-15.1 [FreeBSD-base] conflicts with FreeBSD-utilities-dbg-15.0p11 [installed] on /usr/lib/debug/usr/bin/zstd.debug
  - FreeBSD-zstd-dbg-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-dbg-15.0p11 [installed] on /usr/lib/debug/usr/lib/libprivatezstd.so.5.debug
  - FreeBSD-pam-dev-15.1 [FreeBSD-base] conflicts with FreeBSD-runtime-dev-15.0p11 [installed] on /usr/include/security/openpam.h
Checking integrity... done (0 conflicting)
Conflicts with the existing packages have been found.
One more solver iteration is needed to resolve them.
The following 500 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	FreeBSD-pam: 15.1 [FreeBSD-base]
	FreeBSD-pam-dbg: 15.1 [FreeBSD-base]
	FreeBSD-pam-dbg-lib32: 15.1 [FreeBSD-base]
	FreeBSD-pam-dev: 15.1 [FreeBSD-base]
	FreeBSD-pam-dev-lib32: 15.1 [FreeBSD-base]
	FreeBSD-pam-lib: 15.1 [FreeBSD-base]
	FreeBSD-pam-lib32: 15.1 [FreeBSD-base]
	FreeBSD-zstd: 15.1 [FreeBSD-base]
	FreeBSD-zstd-dbg: 15.1 [FreeBSD-base]
	FreeBSD-zstd-dbg-lib32: 15.1 [FreeBSD-base]
	FreeBSD-zstd-dev: 15.1 [FreeBSD-base]
	FreeBSD-zstd-dev-lib32: 15.1 [FreeBSD-base]
	FreeBSD-zstd-lib: 15.1 [FreeBSD-base]
	FreeBSD-zstd-lib32: 15.1 [FreeBSD-base]

Installed packages to be UPGRADED:
	FreeBSD-acct: 15.0 -> 15.1 [FreeBSD-base]
...
	FreeBSD-zoneinfo: 15.0p7 -> 15.1 [FreeBSD-base]

Installed packages to be REMOVED:
	FreeBSD-lldb-dev: 15.0

Number of packages to be removed: 1
Number of packages to be installed: 14
Number of packages to be upgraded: 485

The process will require 12 MiB more space.

Proceed with this action? [y/N]: y
Checking integrity... done (0 conflicting)
[  1/507] Upgrading FreeBSD-bootloader from 15.0 to 15.1...
[  1/507] Extracting FreeBSD-bootloader-15.1: 100%
...
[506/507] Installing FreeBSD-set-optional-dbg-15.1...
[507/507] Installing FreeBSD-set-base-dbg-15.1...
==> Running trigger: mandoc.ucl
Generating apropos(1) database for /usr/share/man...
Generating apropos(1) database for /usr/share/openssl/man...
=====
Message from FreeBSD-local-unbound-15.1:

--
After upgrading local-unbound, the configuration file should be regenerated
by running "service local_unbound setup" before restarting the service.

Upgrade Third-party Kernel Modules

[12:43 nagios04 root ~] # pkg upgrade -r FreeBSD-ports-kmods
Updating FreeBSD-ports-kmods repository catalogue...
pkg: Repository FreeBSD-ports-kmods has a wrong packagesite, need to re-create database
Fetching meta.conf: 100%     179 B   0.2 kB/s    00:01    
Fetching data: 100%    35 KiB  35.6 kB/s    00:01    
Processing entries: 100%
FreeBSD-ports-kmods repository update completed. 239 packages processed.
FreeBSD-ports-kmods is up to date.
Checking for upgrades (0 candidates): 100%
Processing candidates (0 candidates): 100%
Checking integrity... done (0 conflicting)
Your packages are up to date.
[12:44 nagios04 root ~] # 

Check for Failed Configuration Updates

[12:44 nagios04 root ~] # find /etc /usr/local/etc -name '*.pkgnew' -ls
[12:46 nagios04 root ~] # 
[12:46 nagios04 root ~] # sysctl machdep.bootmethod
machdep.bootmethod: UEFI

Identifying the ESP

[12:46 nagios04 root ~] # efibootmgr -v
Boot to FW : false
BootCurrent: 0001
Timeout    : 0 seconds
BootOrder  : 0001, 0000
+Boot0001* EFI SCSI Device AcpiEx(@@@0000,@@@0000,0x0,VMBus,,)/VenHw(9b17e5a2-0891-42dd-b653-80b5c22809ba,d96361baa104294db60572e2ffb1dc7f1a78b3f8821e1848a1c363d806ec15bb)/Scsi(0x0,0x0)
 Boot0000* EFI Network AcpiEx(@@@0000,@@@0000,0x0,VMBus,,)/VenHw(9b17e5a2-0891-42dd-b653-80b5c22809ba,635161f83edfc546913ff2d2f965ed0ed63a0d000bbd0d003ad6bd0b000d3ad6)/MAC(000000000000,0x0)/IPv4(0.0.0.0,0x0,DHCP,0.0.0.0,0.0.0.0,0.0.0.0)


Unreferenced Variables:
 Boot0002* EFI SCSI Device AcpiEx(@@@0000,@@@0000,0x0,VMBus,,)/VenHw(9b17e5a2-0891-42dd-b653-80b5c22809ba,d96361baa104294db60572e2ffb1dc7f1a78b3f8821e1848a1c363d806ec15bb)/Scsi(0x0,0x1)
[12:49 nagios04 root ~] # 

Eh? That doesn’t resemble the documented output at all. The drive device is not mentioned.

I know I have this:

[12:49 nagios04 root ~] # gpart show
=>       40  134217648  da0  GPT  (64G)
         40       2008       - free -  (1004K)
       2048        348    1  freebsd-boot  (174K)
       2396      66584    2  efi  (33M)
      68980   62914560    3  freebsd-zfs  (30G)
   62983540   71234148       - free -  (34G)

=>      40  33554352  da1  GPT  (16G)
        40  29360048    1  freebsd-ufs  (14G)
  29360088   4194304    2  freebsd-swap  (2.0G)

[12:50 nagios04 root ~] # zpool list

As such, I’d expect to see da0p2 in the output above.

I sought advice via IRC. The consensus was: proceed using da0p2.

Mounting the ESP

[13:28 nagios04 root ~] # mount_msdosfs /dev/da0p2 /boot/efi
mount_msdosfs: /dev/da0p2: Operation not permitted

[13:28 nagios04 root ~] # mount | grep /boot/efi 
/dev/gpt/efiboot0 on /boot/efi (msdosfs, local)

Eh? What’s that? Oh, it’s da0p2 by another name:

[13:28 nagios04 root ~] # gpart show -l
=>       40  134217648  da0  GPT  (64G)
         40       2008       - free -  (1004K)
       2048        348    1  bootfs  (174K)
       2396      66584    2  efiboot0  (33M)
      68980   62914560    3  rootfs  (30G)
   62983540   71234148       - free -  (34G)

=>      40  33554352  da1  GPT  (16G)
        40  29360048    1  (null)  (14G)
  29360088   4194304    2  (null)  (2.0G)

[13:29 nagios04 root ~] # 

See efiboot0 mentioned there… same thing as da0p2

Install the Boot Loader

The instructions say (for me, on amd64) to do this:

cp /boot/loader.efi /boot/efi/efi/freebsd/loader.efi
cp /boot/loader.efi /boot/efi/efi/boot/bootx64.efi

However, the /boot/efi/efi/freebsd directory does not exist on my host.

Consultations indicated that this system does not have an efi boot entry and is relying on bootx64.efi

… it is now Friday morning, and I have resumed my quest. In the meantime, the host has been performing as expected.

Back to my directories.

Is this a situation to be fixed?

Answer was: no particular need to fix it if the system boots fine.

Onward I go!

[16:07 nagios04 root ~] # cp /boot/loader.efi /boot/efi/efi/boot/bootx64.efi
[16:10 nagios04 root ~] # 

NOTE: that is an MSDOS file system:

[16:13 nagios04 root ~] # mount | grep /boot/efi
/dev/gpt/efiboot0 on /boot/efi (msdosfs, local)

Finish

Before you reboot, I didn’t do the following on this host, but I did on the next host. I set the BE to boot one time (-t). In case there was a problem, the next boot would be back on FreeBSD 15.0. This is how I did that:

[16:42 r730-03 root ~] # bectl list 
BE                                Active Mountpoint Space Created
15.0-RELEASE-p9_2026-06-10_111727 -      -          468M  2026-06-10 11:17
default                           NR     /          15.1G 2023-08-10 21:51
pre-15.1                          -      -          948K  2026-07-17 16:37
pre-pkgbasify_2026-06-30_152431   -      -          397M  2026-06-30 15:24

[16:42 r730-03 root ~] # bectl activate pre-15.1
Successfully activated boot environment pre-15.1
[16:42 r730-03 root ~] # bectl activate -t default
Successfully activated boot environment default for next boot
[16:42 r730-03 root ~] # sudo shutdown -r now
Shutdown NOW!
shutdown: [pid 37935]

....

[12:46 pro05 dvl ~] % r730-03
Last login: Fri Jul 17 16:37:25 2026 from pro05.startpoint.vpn.unixathome.org
[16:46 r730-03 dvl ~] % uptime
 4:46PM  up 42 secs, 1 user, load averages: 0.35, 0.09, 0.03
[16:46 r730-03 dvl ~] % freebsd-version -ukr
15.1-RELEASE-p1
15.1-RELEASE-p1
15.1-RELEASE-p1


[16:46 r730-03 dvl ~] % uname -a
FreeBSD r730-03.int.unixathome.org 15.1-RELEASE-p1 FreeBSD 15.1-RELEASE-p1 releng/15.1-n283582-0f691888dc56 GENERIC amd64
[16:46 r730-03 dvl ~] % bectl list
BE                                Active Mountpoint Space Created
15.0-RELEASE-p9_2026-06-10_111727 -      -          468M  2026-06-10 11:17
default                           N      /          1.49G 2023-08-10 21:51
pre-15.1                          R      -          13.6G 2026-07-17 16:37
pre-pkgbasify_2026-06-30_152431   -      -          397M  2026-06-30 15:24
[16:46 r730-03 dvl ~] % sudo bectl activate default
Successfully activated boot environment default
[16:47 r730-03 dvl ~] % bectl list                 
BE                                Active Mountpoint Space Created
15.0-RELEASE-p9_2026-06-10_111727 -      -          468M  2026-06-10 11:17
default                           NR     /          15.1G 2023-08-10 21:51
pre-15.1                          -      -          952K  2026-07-17 16:37
pre-pkgbasify_2026-06-30_152431   -      -          397M  2026-06-30 15:24
[16:47 r730-03 dvl ~] % 

I’m happy with the boot, so I made default the next boot for the BE.

This is what I did with this host:

[16:14 nagios04 root ~] # shutdown -r now
Shutdown NOW!
shutdown: [pid 7690]
[16:14 nagios04 root ~] #                                                                                
*** FINAL System shutdown message from dvl@nagios04.unixathome.org ***       

System going down IMMEDIATELY                                                  

                                                                               
                                                                               
*** FINAL System shutdown message from dvl@nagios04.unixathome.org ***       

System going down IMMEDIATELY                                                  

                                                                               

System shutdown time has arrived
Connection to nagios04.unixathome.org closed by remote host.
Connection to nagios04.unixathome.org closed.
[12:15 pro05 dvl ~] % 

Success

Welcome to my first FreeBSD 15.1 host:

[12:15 pro05 dvl ~] % nagios04 
Last login: Fri Jul 17 15:55:22 2026 from tallboy.unixathome.org
[16:15 nagios04 dvl ~] % uptime
 4:15PM  up 37 secs, 1 user, load averages: 0.30, 0.08, 0.03
[16:15 nagios04 dvl ~] % freebsd-version -urk
15.1-RELEASE-p1
15.1-RELEASE-p1
15.1-RELEASE-p1
[16:15 nagios04 dvl ~] % 

Things which go wrong

Sometimes, there is an Authentication error. Perhaps multiple times during one update. For this host, it was 4 times.

In which case, just try again:

[17:21 zuul root ~] # pkg -oABI=FreeBSD:15:$(uname -p) -oOSVERSION=1501000 upgrade -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
pkg: Repository FreeBSD-base has a wrong packagesite, need to re-create database
Fetching meta.conf: 100%     179 B   0.2 kB/s    00:01    
Fetching data: 100%    82 KiB  84.0 kB/s    00:01    

...

[123/340] Fetching FreeBSD-clang-15.1p1: 100%    38 MiB   6.6 MB/s    00:06    
[124/340] Fetching FreeBSD-cron-15.1: 100%    39 KiB  40.1 kB/s    00:01    
pkg: https://pkgmir.geo.freebsd.org/FreeBSD:15:amd64/base_release_1/Hashed/FreeBSD-utilities-dbg-15.1p1~2f499f2b0b.pkg: Authentication error
[17:22 zuul root ~] # pkg -oABI=FreeBSD:15:$(uname -p) -oOSVERSION=1501000 upgrade -r FreeBSD-base
Updating FreeBSD-base repository catalogue...
FreeBSD-base repository is up to date.
FreeBSD-base is up to date.
Checking for upgrades (333 candidates): 100%
Processing candidates (333 candidates): 100%
The following 340 package(s) will be affected (of 0 checked):

New packages to be INSTALLED:
	FreeBSD-pam: 15.1 [FreeBSD-base]

...
	FreeBSD-zoneinfo: 15.0p7 -> 15.1 [FreeBSD-base]

Number of packages to be installed: 8
Number of packages to be upgraded: 332

The operation will free 1 MiB.
359 MiB to be downloaded.

Proceed with this action? [y/N]: y
[  1/216] Fetching FreeBSD-utilities-dbg-15.1p1: 100%    13 MiB   4.7 MB/s    00:03    
[  2/216] Fetching FreeBSD-xz-dbg-15.1: 100%   298 KiB 305.5 kB/s    00:01    
...
[ 48/216] Fetching FreeBSD-hast-15.1: 100%   102 KiB 104.8 kB/s    00:01    
pkg: https://pkgmir.geo.freebsd.org/FreeBSD:15:amd64/base_release_1/Hashed/FreeBSD-bluetooth-15.1~e5694024a5.pkg: Authentication error

Repeat.. etc. Eventually, you’ll get them all downloaded.

Website Pin Facebook Twitter Myspace Friendfeed Technorati del.icio.us Digg Google StumbleUpon Premium Responsive

Leave a Comment

Scroll to Top