On October 27th, 2020, FreeBSD 12.2 was released. This is the second point release for the 12.x branch.
It is important to upgrade in a timely manner because security and bugfixes will stop being released for 12.1 approximately 3 months after the release of 12.2. If you want your system to continue to receive patches, you should update by January 2021 (~3 months from the release of 12.1)
If your system is still on the FreeBSD 11.x it’s good until around September 30th 2021 as long as you continue to upgrade the system with point releases. This guide is largely relevant for upgrading 11.x point releases as well.
12.2 is a minor update containing bugfixes, updated packages and drivers, and minor features. Some of the more notable changes are improved wireless networking, support for 100GbE ethernet with Intel adapters, and the ability to run Linux in a jail. Read the full release notes here. Also be sure to check out the errata which lists any issues that may be encountered while upgrading. As of the time of writing this article, certain third-party kernel modules may need to be rebuilt after upgrading, and Beaglebone boards are experiencing a regression where I/O is very slow on SD cards.
Ensure your system is backed up before upgrading! Although this is a minor release, things can and do break occasionally.
Once you’re all set you can begin the upgrade process by logging in as root or typing su as a regular user to elevate. Simply run
freebsd-update -r 12.2 upgrade
The updater will grab metadata from a FreeBSD update server and prepare for the upgrade. It will double check that it’s updating all of the components that are installed before proceeding.
Thousands of patches will then be downloaded. This can take a while depending on your internet connection speed.
If the error message “
The update metadata is correctly signed, but failed an integrity check. Cowardly refusing to proceed any further” you need to finish some prior updates first. Do this by running:
A reboot may be required after running those two commands.
After all of the patches are downloaded the current configuration files will be checked against the defaults for the new version. Any differences will be displayed in a manner similar to performing a
diff on a file. Check the differences to see if any changes will break something in the system.
The updater will then list all of the files being added, removed, and changed. You can either scroll through each screen to see the changes or hit the Q key to proceed to the next screen. When all changes have been displayed, you’ll be asked to run:
to apply the kernel patches. After a few minutes you’ll be asked to reboot the machine and run the same command to apply the userland patches.
Finally you’ll be asked to rebuild any third-party software that have been installed from the ports system.
If you haven’t installed any software from the ports collection, you’re all done!
If you need to rebuild third-party software, run:
portmaster is not found, you can install it easily by running:
pkg install portmaster
Depending on how many ports have been installed, the process can take a very long time. When it’s done, complete the upgrade process by running
for the final time.
Although it’s not required, you should reboot once more to make sure the system still comes up after the upgrade.
To make sure the upgrade was successful, run
If the returned version starts with 12.2 – you’re all set!