FreeBSD 13 released: Here is how to upgrade FreeBSD 12 to 13

Содержание

FreeBSD 13 verfication

T he FreeBSD project released FreeBSD version 13. The new version comes with updated software and features for a wild variety of architectures. The latest release provides performance improvements and better support for FreeBSD. One can benefit greatly using an upgraded version of FreeBSD. Let us see what’s new and quickly update FreeBSD 12 to 13 using the CLI.

FreeBSD 13 released – What’s new?

  1. OpenZFS now provide the ZFS implementation on FreeBSD 13. In other words, you will get the same ZFS version on Linux and FreeBSD.
  2. The NFS client and server now support NFSv4.2 with extended attributes.
  3. Also, the NFS client and server now support NFS over TLS for security and privacy reasons.
  4. FreeBSD 13 removed several network drivers for obsolete Ethernet adapters such as Crystal Semiconductor CS8900/CS8920 and others.
  5. They added the qat driver, supporting some of the Intel QuickAssist (QAT) device’s cryptographic acceleration functions.
  6. Additional boot loader changes for EFI system partition.
  7. FreeBSD 13 features a rewritten routing stack. It is based on the introduction of next hops – objects holding all necessary states to pass a packet to the desired destination.
  8. Multipath routing support has been rewritten in a more scalable fashion.
  9. The 64-bit ARM architecture known as arm64 or AArch64 is promoted to Tier-1 status for FreeBSD 13.
  10. The bhyve(8) utility works reliably with more VNC clients including the macOS “Screen Sharing” application. See the release note for all features.

How to upgrade FreeBSD 12 to 13

FreeBSD 13 released: Here is how to upgrade FreeBSD 12 to 13

Let us note down the FreeBSD version by running the following commands:
freebsd-version
uname -mrs
Make sure you apply all existing pending updates for FreeBSD 12.x:
# freebsd-update fetch
# freebsd-update install
# pkg upgrade

I already had all updates applied using Ansible, but you may see the update and might need to reboot your FreeBSD system if the kernel patch is installed. See FreeBSD Applying Security Updates Using pkg/freebsd-update for more info.

WARNING: Make sure you backup all important data, config files, and database tables/DBS. The nixCraft is not responsible for any data loss, and upgrading FreeBSD should only be attempted after backing up all data.

  • No ads and tracking
  • In-depth guides for developers and sysadmins at Opensourceflare✨
  • Join my Patreon to support independent content creators and start reading latest guides:

Upgrading from previous releases of FreeBSD 12.2 to 13.0 using binary method

I tested the following instructions with my AWS EC2 FreeBSD AMD64 VM. Please note that upgrading powerpc64 systems from earlier FreeBSD Releases is NOT supported. Users need to reinstall, due to using new ABI. Binary upgrades between RELEASE versions are recommended using the freebsd-update command-line utility. Hence, run the following freebsd-update command:
# freebsd-update -r 13.0-RELEASE upgrade

How to ugprade FreeBSD 12 to 13 using the CLI

Binary upgrades started on my FreeBSD EC2 AWS cloud server

Now that updates are downloaded, merged in a directory, it is time to commit changes to the disk. In other words, type the following command on your FreeBSD box to apply 12 to 13 updates:
# freebsd-update install
Here is what I saw:

Therefore, I reboot the FreeBSD box:
# shutdown -r now
## OR ##
# reboot
My ssh session disconnected:

Removing all old shared libraries and object files

After sometimes the system will come back online, restart the freebsd-update session using the following command:
# freebsd-update install

Updating all apps and packages

Now the base FreeBSD system is fully patched and updated. It is time to update all binary packages too due to ABI changes. We simply run the following pkg command:
# pkg-static install -f pkg
# pkg bootstrap -f
# pkg update
# pkg upgrade
Now I installed all 3rd party apps such as Python, Nginx, and so on. We need to run the following command one more time for removing old shared object files. Hence, make sure one more last time you run the following command and you are done with updating FreeBSD from 12 to 13 using the CLI:
# freebsd-update install
Outputs:

Is is also possible to upgrade the system using source based method. You need to read the information provided in /usr/src/UPDATING file.
# vim /usr/src/UPDATING

Verifying FreeBSD 12 to 13 upgrade

Make sure all services are running:
# ps aux
# sockstat -l
# sockstat -4
# sockstat -6
# netstat -a -n | grep LISTEN
top

FreeBSD 13 verfication

Check out for errors in log file using the cat command/grep command/egrep command and other tools:
# tail -f /var/log/messages
# tail -f /var/log/nginx/myapp.log
# grep error /path/to/app
# egrep -i ‘err|warn|cri’ /var/log/messages
See version:
uname -mrs
freebsd-version

Remove Unwanted/Unused Dependencies in FreeBSD package (optional)

Upgrade may leave some orphan binary packages, and we can get rid of them too using the pkg command:
# pkg autoremove

How to upgrade FreeBSD jail from 12 to 13

We can upgrade jail too. The concept is the same, but you need to tell the current version as follows. Get jail name and base dir:
# jls
My jail:

Now run :
# freebsd-update -b /jails/dnscrypt/ —currently-running 12.2-RELEASE -r 13.0-RELEASE upgrade
Where,

  1. -b /jails/dnscrypt/ : Operate on a system mounted at jail basedir /jails/dnscrypt/.
  2. —currently-running 12.2-RELEASE : We need to tell freebsd-update like this when using the upgrade command or fetch command for jail upgrades. Do not detect the currently-running release. Only needed when upgrading jails.
  3. -r 13.0-RELEASE upgrade : Specify the new release to which should jail upgrade.

Next, running subsequent jail upgrade and install commands can be done normally with -b for jail dircotry:
## 1. Install downloaded upgrades for jail ##
# freebsd-update -b /jails/dnscrypt/ install
## 2. Reboot/restart our jail ##
# /etc/rc.d/jail restart
# freebsd-update -b /jails/dnscrypt/ install
# jls
## 3. Note down jail id and gain shell ##
# jexec 2 sh
## 4. Upgrade all package inside jail too ##
# pkg-static install -f pkg
# pkg bootstrap -f
# pkg update
# pkg upgrade
## 5. Exit out of jail ##
# exit

A note about upgrading ZFS storage pools version on FreeBSD

When we run the zpool status command we will see the message as follows:

In other words, it is time to upgrade the zpool version on FreeBSD:
$ sudo zpool upgrade -a
See “How to upgrade ZFS storage pools version on FreeBSD” for detailed information.

Summing up

FreeBSD 13 continues to lead as a robust BSD family of the operating system for end-users. It still maintains classic Unix features while giving out cutting-edge features such as Jails, Bhyve, powerful networking stack, firewalls, and more. I would strongly suggest that you head ahead to the FreeBSD download page and read the release note too.


Источник: www.cyberciti.biz