https://1000marcas.net/wp-content/uploads/2021/06/FreeBSD-logo.png

I just went through quite a few FreeBSD 14 upgrades over the past month and just thought I'd note down the process. I also run quite a few jails on my FreeBSD hosts and also noted down what has been working for me. Seems like this information is very rarely documented across the internet so hopefully this helps someone out there!

Major Version Upgrade

Upgrade Host OS

Follow the guide below to upgrade a FreeBSD system to the latest OS version

  1. First download the needed patching files

    freebsd-update upgrade -r 14.0-RELEASE
  2. Once completed install the new version with

    freebsd-update install
  3. Now reboot the system

    reboot
  4. Now run step 2. again

    freebsd-update install
  5. Now we need to reinstall pkg and all installed packages.

    • Upgrade PKG with

      pkg-static install -f pkg
    • Upgrade installed packages with

      pkg upgrade -f
  6. Then we need to remove any old binaries, run freebsd-update install again
  7. Finally run one last reboot and then run uname -r to confirm we are on the latest version

Upgrade Jail OS

Follow the guide below to upgrade a FreeBSD jail to the latest OS version

  1. First download the needed patching files

    freebsd-update upgrade -j "jail_name" -r 14.0-RELEASE
  2. Once completed install the new version with

    freebsd-update -j "jail_name" install
  3. Now reboot the jail with

    service jail restart "jail_name"
  4. Now run freebsd-update -j "jail_name" install again.

    freebsd-update -j "jail_name" install
  5. Now we need to reinstall pkg and all installed packages.

    • Upgrade PKG with

      jexec "jail_name" pkg-static install -f pkg
    • Upgrade installed packages with

      jexec "jail_name" pkg upgrade -f
  6. Then we need to remove any old binaries, run freebsd-update -j "jail_name" install again.
  7. Finally run one last service restart and then run jexec "jail_name" uname -r to confirm we are on the latest version

Final Notes

Again, this is very straight to the point but for some reason hard to find information that's laid out so clean.

Happy upgrading!