Home FreeBSD How To Upgrade To FreeBSD 13.2 From FreeBSD 13.1

How To Upgrade To FreeBSD 13.2 From FreeBSD 13.1

A Step By Step Guide To Upgrade FreeBSD 13.1 To FreeBSD 13.2.

By sk
3.4K views 5 mins read

FreeBSD 13.2 version has been released. If you're running older FreeBSD versions like FreeBSD 13.1, you can upgrade FreeBSD to the latest available version. This guide explains how to upgrade to FreeBSD 13.2 from FreeBSD 13.1.

Heads Up: Please note that FreeBSD upgrade should only be attempted after backing up all your important data and configuration files.

Introduction

The FreeBSD Release Engineering Team has announced announced the general availability of FreeBSD 13.2-RELEASE. This is the third release of the stable/13 branch.

If you prefer a fresh installation, head over to the FreeBSD download page and get a suitable version for your architecture. And then refer to the following guide to know how to install FreeBSD.

Install FreeBSD - Step By Step Guide

If you're already running older versions (E.g. FreeBSD 13.1), you can easily upgrade FreeBSD 13.1 to FreeBSD 13.2. In this step by step guide, let me show you how to upgrade to FreeBSD 13.2 from FreeBSD 13.1 version.

Update FreeBSD

First things first. Take a backup of everything that you can't afford losing. FreeBSD 13.2 upgrade process worked just fine in my test box. However, I strongly recommend you to backup your data, just in case.

Let us check the currently running FreeBSD OS and Kernel version using commands:

$ freebsd-version -k

Sample output:

13.1-RELEASE
$ uname -mrs

Sample output:

FreeBSD 13.1-RELEASE amd64
Check FreeBSD OS and Kernel Versions
Check FreeBSD OS and Kernel Versions

As you can see, I am currently running FreeBSD 13.1 version in my system.

Let us update our current FreeBSD 13.1 system.

To download and install the FreeBSD security patches, run the following commands as sudo or root user:

$ sudo freebsd-update fetch
$ sudo freebsd-update install
$ sudo pkg upgrade

Keep an eye on the screen. You will be often prompted to enter 'y' in-order to apply the updates.

After all packages are upgraded, reboot your FreeBSD machine using command:

$ sudo shutdown -r now

Or,

$ sudo reboot

After system reboot, log in to your FreeBSD and to upgrade FreeBSD 13.1 to FreeBSD 13.2.

Upgrade to FreeBSD 13.2 from FreeBSD 13.1

Run the following command to upgrade FreeBSD 13.1-RELEASE to FreeBSD 13.2 version:

$ sudo freebsd-update -r 13.2-RELEASE upgrade

Once you run this command, the freebsd-update command will evaluate the configuration file and current system in an attempt to gather the information necessary to perform the upgrade.

During the upgrade, you will be asked what to install, what to remove or how to proceed. You may need to type y and hit ENTER a few times to continue.

Sample output:

Looking up update.FreeBSD.org mirrors... 2 mirrors found.
Fetching metadata signature for 13.1-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata files... done.
Inspecting system... done.

The following components of FreeBSD seem to be installed:
kernel/generic kernel/generic-dbg src/src world/base world/base-dbg
world/lib32 world/lib32-dbg

The following components of FreeBSD do not seem to be installed:

Does this look reasonable (y/n)? y

Fetching metadata signature for 13.2-RELEASE from update2.freebsd.org... done.
Fetching metadata index... done.
Fetching 1 metadata patches. done.
Applying metadata patches... done.
Fetching 1 metadata files... done.
Inspecting system... 
[...]
Upgrade to FreeBSD 13.2 from FreeBSD 13.1
Upgrade to FreeBSD 13.2 from FreeBSD 13.1

The above command will start to download all packages required for FreeBSD 13.2. This is going to take several minutes depending upon the Internet speed and the number of installed packages on your FreeBSD system. So please be patient and also keep an eye on the system.

During the upgrade task, Configuration files will be merged. The results of every successful merge will be shown to the user as the process continues.

Please note that the current system is not being altered yet, because all merging and patching is happening in another directory.

Once all patches have been applied successfully, all configuration files have been merged, the updater will notify some changes, which occurred between the current and previous FreeBSD versions. Type y and press ENTER to accept the changes and continue FreeBSD upgrade task.

FreeBSD Upgrade
FreeBSD Upgrade

After downloading all upgrades, install the downloaded upgrades and commit all changes to the disk by running the following command:

$ sudo freebsd-update install

This command will complete shortly and you will see the following output.

Creating snapshot of existing boot environment... done.
Installing updates...
Kernel updates have been installed.  Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.
Install Downloaded Upgrades
Install Downloaded Upgrades

Now, all the Kernel updates have been installed. Please reboot your FreeBSD system to apply the patches.

$ sudo reboot

After logging into the system, run the following command again to finish installing updates:

$ sudo freebsd-update install

Sample output:

Creating snapshot of existing boot environment... done.
Installing updates...Scanning //usr/share/certs/blacklisted for certificates...
Scanning //usr/share/certs/trusted for certificates...
rmdir: ///usr/tests/usr.bin/timeout: Directory not empty
 done.

After done with installing all updates, reboot your FreeBSD system.

$ sudo reboot

Verify if the upgrade was successful by checking the FreeBSD OS and Kernel versions:

$ freebsd-version -k
13.2-RELEASE
$ uname -mrs
FreeBSD 13.2-RELEASE amd64
Verify FreeBSD OS and Kernel Version
Verify FreeBSD OS and Kernel Version

Congratulations! We have successfully upgraded to FreeBSD 13.2.

We need to do one more thing as well. After a major version upgrade, all installed packages and ports should be upgraded.

Update all installed packages and ports collections using the following commands:

$ sudo pkg-static install -f pkg
$ sudo pkg bootstrap -f
$ sudo pkg update
$ sudo pkg upgrade -y

That's it. Reboot once again and start using FreeBSD version.

Conclusion

As you can see, upgrading to FreeBSD 13.2 from older FreeBSD versions isn't that hard. If you carefully followed the steps given in this tutorial, you can able to successfully upgrade FreeBSD 13.1 to FreeBSD 13.2 version in no time. Again I strongly recommend you to backup important data before attempting FreeBSD upgrade. Good luck!

You May Also Like

Leave a Comment

* By using this form you agree with the storage and handling of your data by this website.

This site uses Akismet to reduce spam. Learn how your comment data is processed.

This website uses cookies to improve your experience. By using this site, we will assume that you're OK with it. Accept Read More