22.6 C
Jaipur
Tuesday, May 18, 2021

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

Must read


The 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

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.

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

Binary upgrades started on my FreeBSD EC2 AWS cloud server

The freebsd-update will assess the configuration files and might prompt you as follows for config file merging and other options as per your installed apps and customizations. Read them carefully:

..11090....11100....11110....11120....11130....11140....11150....11160....11170... done.
Applying patches... 
Fetching 627 files... ....10....20....30....40....50....60....70....80....90....100
...380....390....400....410....420....430....440....450....460....470....480....490
Attempting to automatically merge changes in files... done.
 
The following file will be removed, as it no longer exists in
FreeBSD 13.0-RELEASE: /etc/motd
Does this look reasonable (y/n)? y
......
...
....
/boot/boot1
/boot/boot1.efi
/boot/boot2
/boot/brand-fbsd.4th
/boot/brand.4th
/boot/cdboot
/boot/check-password.4th
/boot/color.4th
/boot/defaults/loader.conf
/boot/delay.4th
/boot/device.hints
/boot/efi
/boot/efi.4th
/boot/frames.4th
/boot/gptboot
To install the downloaded upgrades, run "/usr/sbin/freebsd-update install".

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:

src component not installed, skipped
Installing updates...
Kernel updates have been installed.  Please reboot and run
"/usr/sbin/freebsd-update install" again to finish installing updates.

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

Connection to ec2.freebsd-nixcraft.wan.sweet.home closed by remote host.
Connection to ec2.freebsd-nixcraft.wan.sweet.home closed.

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:


src component not installed, skipped
Installing updates... done.

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

Related: FreeBSD Unix Find Out Which Programs Are Listening On a Given Port Number

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

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.

Source link

- Advertisement -

More articles

LEAVE A REPLY

Please enter your comment!
Please enter your name here

- Advertisement -

Latest article