Jump to content

Update Kernel FreeBSD


Linux Hint

Recommended Posts

FreeBSD is one of the many operating systems in the Berkeley Software Distribution family, which includes OpenBSD, NetBSD, DragonFly BSD, to name a few. FreeBSD shares quite a few similarities with Linux; the core difference between the two is that unlike Linux, FreeBSD comes as complete with the kernel, drivers, as well as system software. With every new release, FreeBSD gets new features to make the kernel more performance efficient.

This post demonstrates how to upgrade FreeBSD version 11.x to v12.

Upgrade FreeBSD v11 to v12

Step 1: Prerequisites

To see what version you’re currently using, issue the command below:

$ freebsd-version
$ uname -mrs

word-image-67.jpeg

The output reveals we’re using version 12.2 as the latest, but the following commands let you upgrade the kernel anyway. Next, type in the command below, and press enter:

$ freebsd-update fetch install

word-image-68.jpeg

Then, use the pkg command to update any or all packages.

$ pkg update && pkg upgrade

word-image-69.jpeg

Step 2: Upgrade FreeBSD using the Binary Method

Use the freebsd-update command below to update using the binary method:

$ freebsd-update -r 12.2-RELEASE upgrade

word-image-70.jpeg

The command above examines the configuration file. It’ll ask permission to make changes, so press y when it does.

With the downloads and configurations are taken care of, we’ll now change the disk properties. Enter the command below:

$ freebsd-update install

word-image-71.jpeg

Then restart the system:

$ reboot

Upon a successful reboot, make sure the system is back online and use the command below to get rid of the old files and continue with the upgrade:

$ freebsd-update install

word-image-72.jpeg

With the base system updated, update all the binary packages with the command below:

$ pkg-static install -f pkg

word-image-73.jpeg

$ pkg update && pkg upgrade

word-image-74.jpeg

Then check the following directory:

$ sudo /usr/sbin/freebsd-update install

word-image-75.jpeg

Step 3: Verifying the Update

First, verify if every service is active:

$ ps aux
$ sockstat -l
$ sockstat -4
$ sockstat -6
$ netstat -a -n | grep LISTEN
$ top

word-image-76.jpeg

Make sure the log file isn’t encountering any errors while using the various command line utilities:

$ tail -f /var/log/messages

word-image-77.jpeg

$ grep error /path/to/app
$ egrep -i 'err|warn|cri' /var/log/messages

Check the current version:

$ uname -mrs
$ freebsd-version

word-image-78.jpeg

Wrapping up

This post illustrated how to upgrade FreeBSD v11 to 12 with the binary package method. Although FreeBSD 11.2 has not ended its support, it is better to upgrade to version 12. With every upgrade, the FreeBSD kernel is made more resource-efficient and faster.

View the full article

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...