How To Upgrade To FreeBSD 13 From FreeBSD 12

Содержание

The FreeBSD Release Engineering Team is recently announced the availability of FreeBSD 13.0-RELEASE. This is the first release of the stable/13 branch. FreeBSD 13.0 is shipped with many updated set of features. It supports several architectures including amd64, i386, powerpc, powerpc64, powerpc64le, powerpcspe, armv6, armv7, aarch64, and riscv64. If you prefer a fresh installation, head over to the FreeBSD 13.0 download page and get a suitable version for your architecture. If you already have older versions, you an directly upgrade FreeBSD 12 to FreeBSD 13. In this step by step guide, let us see how to upgrade to FreeBSD 13 from FreeBSD 12.

Update FreeBSD 12

First things first. Take a backup of everything that you can’t afford losing. FreeBSD upgrade worked 100% in my case. However, backup the data, just in case.

Check FreeBSD OS version and kernel version using commands:

Sample output:

Sample output:

Check FreeBSD OS version and kernel version

As you see above, the installed version is FreeBSD 12.0-RELEASE. I haven’t updated my FreeBSD test machine for a long time, hence it shows 12.0. The latest version in 12.x branch is 12.2.

Before upgrading to next available major version, we must update our current FreeBSD 12.x version.

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

Once the packages are upgraded, reboot your system:

It is time to upgrade FreeBSD 12 to FreeBSD 13.

Upgrade to FreeBSD 13 from FreeBSD 12

Run the following command to upgrade to FreeBSD 13.0-RELEASE from FreeBSD 12.x version:

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:

Upgrade to FreeBSD 13 from FreeBSD 12

The above command will start to download all packages. Sit back and relax. It will take a while depending upon the speed of your Internet connection.

During the upgrade task, Configuration files will then 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, run the following command to commit all changes to the disk:

Sample output:

Commit the patches and updates to disk in FreeBSD

All Kernel updates have been installed in your FreeBSD. You need to reboot your system to apply the patches.

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

After all updates are installed, you will see the following output:

Once again the run the same command to remove old shared libraries and complete FreeBSD 13.0 upgrade task.

Finally, reboot your system to complete the upgrade task.

Verify if FreeBSD 13.0 is upgraded successfully by checking the OS version.

And check the FreeBSD Kernel version:

FreeBSD 13.0 is successfully upgraded

Congratulations! We just upgraded to FreeBSD 13.0. 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:

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

Troubleshooting pkg update error in FreeBSD

After upgrading to FreeBSD 13.0, I got the following error when I try to update the ports collections:

This usually happens when we upgrade 12.0 to 12.1 or 2. To fix this issue, update ports-mgmt/pkg from the ports tree using ports-mgmt/portmaster .

Fetch the ports tree using commands if you haven’t done it already:

Sample output:

Next run the following command to download and extract the entire ports tree to the /usr/ports directory.


Источник: ostechnix.com