How to Upgrade FreeBSD 10.x to FreeBSD 11.0
The upgrade from FreeBSD 10.x to 11.0 is relatively minor. Check this post for highlights. The latest branch of 10.x is 10.3 and is expected to reach end-of-life on April 30, 2018. That means that you need to upgrade to 11 before then in order to continue to receive software patches.
Before you upgrade, be sure to check the release notes to see the major changes in the new version. Some custom configurations may need to be redone to work with FreeBSD 11.
The process is very straightforward. While using elevated privileges with su
or sudo
, run:
freebsd-update -r 11.0-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.
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:
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.
Finally you’ll be asked to rebuild any third-party software that have been installed from the ports system. To do this, 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. When it does, check to make sure the system is on FreeBSD 11 by running:
freebsd-version
If the returned version starts with 11.0 – you’re all set!
Make sure to keep the system patched going forward to ensure a happy and healthy FreeBSD install.