Upgrading FreeBSD

Last edited on 2025-06-11 Tagged under  #freebsd   #bsd 

Part of the "Exploring FreeBSD on a Laptop" series.

Tested on FreeBSD 14.2 upgrading to 14.3

A new version of FreeBSD was released on June 10th. Its a minor version upgrade in the FreeBSD 14.x series: moving from 14.2 to 14.3, and its my first time trying to upgrade a FreeBSD system.

I experienced one issue during the install, described below, but its now resolved and I'm now running on the latest release of FreeBSD.



Backup

Regardless of the BSD or Linux distribution you might be running, its imperative to have an up to date backup of any data that is important to you, particularly the contents of the /home directory.

Upgrade to 14.3-RELEASE

Command freebsd-update(8) is used to upgrade the system. Its configuration file is /etc/freebsd-update.conf.

NOTE
The system to be upgraded is using a generic kernel with no custom-compiled kernel modules.

Ensure the current system is up to date with respect to security patches and fixes:

# freebsd-update fetch
# freebsd-update install

Retrieve all the components of the 14.3-RELEASE required for the upgrade:

# freebsd-update -r 14.3-RELEASE upgrade

There may be prompts asking what should be done when merging certain configuration files (on my system there was only a minor change to sshd_config that required user intervention).

All the patching and merging up to this stage has been done in /var/db/freebsd-update. If the (many) proposed changes to the running system look correct, commit the changes to disk:

# freebsd-update install

NOTE
For future reference if ever an upgrade breaks... Documentation states that freebsd-update has a rollback command that uninstalls the most recently installed update in case of problems.

When freebsd-update finishes, the system must now be rebooted with the newly installed kernel before the non-kernel components are upgraded:

# shutdown -r now

Upgrade Userland

After reboot, install the new userland components:

# freebsd-update install

At this point, hold off on rebooting, because this is where I ran into my first issue....

ISSUE: Mismatched kernel modules

Before I rebooted the first time, I had run pkg to update my non-base installed packages:

# pkg upgrade

After I rebooted my (Intel) graphics module refused to load:

$ dmesg | grep drm
KLD drm.ko: depends on dmabuf - not available or version mismatch
linker_load_file: /boot/modules/drm.ko - unsupported file type
KLD i915kms.ko: depends on drmn - not available or version mismatch
KLD drm.ko: depends on dmabuf - not available or version mismatch
linker_load_file: /boot/modules/drm.ko - unsupported file type
KLD i915kms.ko: depends on drmn - not available or version mismatch
KLD drm.ko: depends on dmabuf - not available or version mismatch
linker_load_file: /boot/modules/drm.ko - unsupported file type
KLD i915kms.ko: depends on drmn - not available or version mismatch

Package information:

$ pkg info | grep drm-
drm-61-kmod-6.1.128.1402000_2  DRM drivers modules
drm-kmod-20220907_3            Metaport of DRM modules for the linuxkpi-based KMS components
gpu-firmware-kmod-20241114,1   Firmware modules for the drm-kmod drivers
libdrm-2.4.123,1               Direct Rendering Manager library and headers

SOLUTION: pkg -r [repository]

There is a separate repository for these kmod packages. Its essential to have the correct versions matched with the upgraded kernel to have working graphics.

What tripped me up is I thought a simple pkg upgrade would upgrade everything. Not so.

Run pkg upgrade and explicitly specify any required repositories:

# pkg upgrade -r FreeBSD
# pkg upgrade -r FreeBSD-kmods

Several kmod packages at this point are now properly upgraded.

A big thank you to everyone who responded to my toot and pointed me in the right direction! ❤️

See also: Bug 287069 - FreeBSD-14.3-BETA4 loading i915 kernel module fails

Reboot

Now we can reboot into a fully 14.3-RELEASE system:

# shutdown -r now

Upon login:

$ freebsd-version -r
14.3-RELEASE
$ egrep "^BRANCH|^REVISION" /usr/src/sys/conf/newvers.sh
REVISION="14.3"
BRANCH="RELEASE"

Upgrade complete. All good!

Resources

You can like, share, or comment on this post on the Fediverse 💬

Thanks for reading! Read other posts?

» Next: Exploring FreeBSD on a Laptop

« Previous: Install FreeBSD (Short and Sweet Version)