My Experience Upgrading to Ubuntu 22.04: Jammy Jellyfish

I run Ubuntu LTS (Long Term Support) on all of my servers, and on my regular desktop. Regular releases of Ubuntu have a six-month release cycle, which is too frequent for me, given all the home lab servers I run. The LTS releases are updated every two years; thus, I upgrade all of my home servers and desktops every two years. Additionally, regular Ubuntu releases are only supported for nine months, whereas LTS releases are supported for 5 years! Here’s my experience upgrading my machines to Ubuntu 22.04 (codename Jammy Jellyfish).

Upgrade to Ubuntu 22.04 Pinterest Pin

Background

Right now, my home lab primarily consists of two Proxmox hosts running a few Ubuntu server VMs and a couple of other OSs. I consider five of the Ubuntu Server VMs to be “production,” meaning they run services that I or my family count on each day. My primary desktop runs Ubuntu Desktop. Prior to upgrading to Ubuntu 22.04 (Jammy Jellyfish), all of my production and desktop Ubuntu systems ran Ubuntu 20.04 (Focal Fossa).

Although standard support for Ubuntu 20.04 isn’t scheduled to end until April of 2025, I still wanted to upgrade to the latest LTS. Over time, fewer and fewer newer releases of software will make it to older Ubuntu releases, and I don’t like to be too far behind.

With that as background, let’s go through the upgrade procedure, and how the upgrade fared for all of my machines.

Upgrade procedure

First let me say, I like the command line, and thus I’ll give command line instructions for upgrading. However, you can do all of this in a GUI. Most people think using a GUI is easier, but I find instructions for using the GUI harder to write and follow!

Prerequisites

  • You have access to a user with sudo privileges
  • 20 GB of free disk space before upgrading
  • A stable Internet connection
  • Time to complete the upgrade (you’ll see how long it took me for various situations below

Step 0: Wait until Ubuntu 22.04.1 comes out

While you can upgrade to 22.04 from 20.04 before 22.04.1 (the first point release) comes out, the official upgrade path is to wait. This occurred in August 2022. But this is good advice going forward.

The point release gives time to iron out the kinks in the release and in the upgrade.

See also  Best Practices for pfSense Firewall Rules

Step 1: Back up your system

Make sure you have your user data and system backed up before upgrading. You never know when something will go wrong and you don’t want to lose important data. You may also want to be able to restore your system in case the upgrade goes wrong.

I store my important user data in a NAS and I also regularly back up that data. I also use Timeshift to regularly back up some of my systems. There are many options for system and user data backups out there, but these are the ones that have worked well for me.

Step 2: Update your current install

Before upgrading to a new version of the OS, you should make sure all your current packages are updated. The following command should bring your system up to date.

sudo apt update && sudo apt upgrade -y

This could take a long time depending on how long it has been since you upgraded your system packages. After all the packages have been installed you should reboot your system. If you don’t, when you try to upgrade to Ubuntu 22.04 it will probably ask you to reboot before upgrading.

sudo reboot

Step 3: Open up a backup SSH port

When you go to upgrade your Ubuntu server from 20.04 to 22.04 the upgrade tool will open a backup SSH connection point on port 1022. Depending on your firewall settings, this port may be blocked. If you are upgrading via SSH you’ll want to make sure you have access to this backup port. The following commands will take care of that if you use the standard UFW firewall.

sudo ufw allow 1022/tcp
sudo ufw reload

Step 4: Start the upgrade tool

After these steps, it’s finally time to actually upgrade your system using the do-release-upgrade tool. You can install the tool with the following command:

sudo apt install update-core-manager

You start the upgrade with the following command:

sudo do-release-upgrade -d

The upgrade tool will walk you through the upgrade with prompts and questions. If you are upgrading while on an ssh connection it will first notify you that it wants to open up a secondary ssh connection on port 1022. If you followed the earlier instructions, you are ready to go for this, and you can just select “Y” to proceed and then press “enter” when it asks you to open up port 1022 (since you’ve already done it).

See also  Using the IKEA Trådfri Remote With Home Assistant

Next, you will be prompted to update the contents of the sources.list file from ‘focal’ (Ubuntu 20.04) to ‘jammy’ (Ubuntu 22.04) entries. Press “Y” and then press “enter” to proceed with the upgrade.

The update tool will run some calculations and analysis and provide a summary of the following:

  • Installed packages that are no longer supported
  • The number of packages to be removed
  • The number of new packages that will be installed
  • The number of packages that will be upgraded
  • Total download size and an approximation of how long the download will take

Press “Y” and press “enter.”

Step 5: Step through the package installs and config file choices and complete the upgrade

The tool will proceed to download the packages and start installing them. You’ll be asked questions about:

  • If you are okay with services being started automatically after some libraries are updated. I recommend you say yes so you don’t keep getting asked.
  • Depending on how many standard configuration files you’ve changed, you’ll be asked questions about whether or not you want to keep your config file or the package maintainer’s version. If you aren’t sure you can compare the two files and then decide.

The upgrade tool will download and upgrade many, many packages. This may take a while. Make sure you pay attention so you can answer questions about config files.

You’ll be prompted to reboot the system to finish the upgrade. Press “Y” and hit “enter” to reboot.

When your system comes back up, you can verify that you are now on Ubuntu 22.04 with the following command:

lsb_release -a

Upgrade results

I ran these upgrades for six of my machines. Here’s how it went for each one:

  • Firestorm — This is a VM that is primarily a backup fileserver. A vanilla Ubuntu server that primarily runs backup jobs to local storage.
    • I upgraded this one before 22.04.1 release and accidentally went to 21.10 first
    • No issues with going from 20.04 to 21.10 to 22.04.
    • Upgrading took about an hour
  • Flashvm — This is a VM that primarily serves as a local webserver and ZoneMinder surveillance camera server.
    • Apache wouldn’t start due to older php7.4 being enabled but not on my system.
      • I had run a2enmod php8.1 and a2dismod php7.4 and then restart Apache2
  • Greenlantern — This is a VM that hosts lightweight Docker containers
    • The upgrade took a total of 15 minutes with no issues.
  • Dockervm — This is another Docker VM, but it has some heavier containers like Graylog, MariaDB, and the Omada controller for my access points and primary switch.
    • Long reboots but otherwise smooth. It took 30 minutes.
  • Havm — This is the VM that hosts Home Assistant.
    • No issues and took about 30 minutes.
  • Superman — This is my primary desktop with all kinds of applications installed.
    • Ubuntu 22.04 moves Firefox to a snap package
    • Dash didn’t show app icons probably because I used a different dock in my 20.04 install. I used the command below to reset it and get it work.
      • dconf reset -f /org/gnome/shell/extensions/dash-to-dock/
    • X2go, a remote desktop system, didn’t work with XFCE anymore
      • Gnome and Mate didn’t work but LXDE did. Snap stuff (firefox, etc) didn’t seem to work. I replaced the snap version of firefox with one from a PPA.
See also  The Docker Containers I'm Using Now

Final thoughts

I’ve been using Ubuntu for over 15 years as my primary OS. I’ve had some rocky upgrades in the past. I’m always prepared to reinstall, but mostly I’m hoping I don’t have to. This year, my upgrades were smooth, and the only problems were with some upgraded packages. Here’s hoping it is smooth again in two years!

How often do you upgrade your OS? How does it usually go? Let me know on Twitter or in the comments.

Share this:

My Experience Upgrading to Ubuntu 22.04: Jammy Jellyfish

by HomeTechHacker time to read: 6 min