- BSD Adventures - http://bsdadventures.com -

How to Upgrade to FreeBSD 11.2

On July 27th, 2018, FreeBSD 11.2 was released. This is the second point release for the 11.x branch.

If your system is running 11.0 or 11.1 it is important to upgrade in the near future. 11.0 stopped receiving patches on November 30th, 2017 and 11.1 will stop receiving patches on September 30th, 2018.
The legacy release, 10.4 is supported until October 31st, 2018. If the system is running any release older than 10.4 or 11.1 you should upgrade immediately because security and bug fixes are no longer being released.

11.2 is a minor update containing bugfixes and some additional features. Read the full release notes here [1]. Also be sure to check out the errata [2] which lists any issues that may be encountered while upgrading.

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 11.2-RELEASE 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.

Beginning the upgrade process from FreeBSD 11.0 to 11.1
Thousands of patches will then be downloaded. In my case it downloaded 11,250! 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:

freebsd-update fetch
freebsd-update install

A reboot may be required.

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:

freebsd-update install

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.

Continuing the FreeBSD 11 upgrade

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 -af

If 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

freebsd-update install

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

freebsd-version

If the returned version starts with 11.2 – you’re all set!

Make sure to keep the system patched going forward [3] to ensure a happy and healthy FreeBSD install. This may also be a good time to update any software installed with pkg [3].