Ubuntu Azure 20.04 –> 22.04 –> 24.04 upgrade caveats

Like many others, I recently received the End of Support (EOS) notice from Azure for Ubuntu 20.04. With the clock ticking, I decided to upgrade my servers to Ubuntu 24.04 using the do-release-upgrade command. The upgrade process went smoothly overall, and I wanted to share a few insights and lessons learned from the experience:

  1. If on Azure, use Azure Snapshots to make a backup. Same for VMware and others.
  2. Snag your databases if using PostgreSQL or MySQL. Delete after upgrade if no longer needed.
  3. Run sudo apt update && apt upgrade first.
  4. You can upgrade to 24.04, but you have to jump to 22.04.
  5. I left my EDR solution running on every Ubuntu server. No need to remove unlike a Windows major release upgrade.
  6. My RMM product continued to work during and after the upgrade enabling cloud-based secure tunneling without the need to open SSH.
  7. do-release-ugprade failed if running PostgresSQL due to third-party repositories. I had to add a hosted repo then upgrade my PostgresSQL cluster after backing up the databases:
    1. apt install postgresql
    2. sudo apt install -y postgresql-common
    3. sudo /usr/share/postgresql-common/pgdg/apt.postgresql.org.sh
    4. apt install postgresql
    5. pg_dropcluster [version#] main  <– drops the old cluster
  8. Nexcloud, Owncloud, and [similiar]cloud products that depend on php7.4 broke after the 24.04 upgrade. That was expected. I added ondrej’s source and reinstalled php7.4. See this for the repo: https://askubuntu.com/questions/1518232/ubuntu-24-04-and-php-7-4
    1. sudo apt -y install php7.4
    2. sudo apt install php7.4 php7.4-gd php7.4-sqlite3 php7.4-curl php7.4-zip php7.4-xml php7.4-mbstring php7.4-mysql php7.4-bz2 php7.4-intl php7.4-smbclient php7.4-imap php7.4-gmp php7.4-ldap
    3. sudo a2enmod php7.4
    4. systemctl restart apache2
    5. a2dismod php7.3
    6. a2enmod php7.4
    7. service apache2 restart
  9. I had some one-off missing modules for WordPress’ CMS on Ubuntu. Apache2 failed to start and it looked to be old references to php7.3 after php8.x was installed. I handled those as needed using a2dismod.

I’ve been using Ubuntu since 10.04 LTS—so, going all the way back to around 2011 and it’s been impressive to see how far the platform has come over the years. I have to say, I was genuinely impressed (and honestly a little surprised) at how smoothly the upgrade from 20.04 to 24.04 went.

That said, no upgrade is without risk. Make sure you have proper backups and a solid rollback plan in place before diving in. Hopefully, your upgrade experience will be as smooth as mine.

 

Leave a Reply

Your email address will not be published. Required fields are marked *