Ubuntu 24.04 upgrade

Published

November 15, 2024

I recently had to reinstall Ubuntu on my ageing Thinkpad X260, after the upgrade from 22.04 to 24.04 went horribly wrong.

I’m still not quite sure what went wrong. It think I’d somehow ended up with (only) the 22.04 kernel installed, which led to lots of “Unknown symbol” errors. My system was quite heavily customised, so it was perhaps a bit optimistic to expect the upgrade to work.

This post is mostly a note to self about how I reconfigured the dual boot setup in case I need to do it again (which I hope I don’t).

I initially thought it was only the kernel that was the problem. This stackexchange post was really useful for mounting the encrypted drive, setting up a chroot environment and reinstalling the kernel. That got me booting to the command prompt.

It turned out I was missing most packages, at which point I decided to wipe and restore from backups.

(I could actually access my encrypted drive through the Ubuntu LiveCDUSB, so took a fresh backup of /home and /etc from this)

I’d got an (essentially unused and tiny) Windows 10 partition dual booting with Ubuntu. I was keen to keep Windows 10 on the machine, as it’s occasionally useful. I’d previously set this up to dual boot with full disk encryption for both OSs roughly following the guide here, but using the legacy BIOS, as that’s what Windows 10 had come preinstalled with.

I was pleased to see that the guide had been updated for Ubuntu 24.04 and is now much easier. I took this opportunity to wipe the Windows partition and switch to UEFI too.

The basic process was:

Once everything was working, I rebooted using the USB image to mount my nfs share containing the backups and restored my data.

A few post install tweaks:

Hibernate doesn’t work out of the box. I enabled this following the guide on Elbrar’s corner. This requires booting with the USB image again, to resize volumes to make space for the encrypted swap partition (with hindsight, the resizing would probably have been quicker if I did this before restoring my data; even so, it was only a few minutes). I didn’t follow the “Install Clevis” section, as I prefer to enter the decryption key before the machine boots. I used the Hibernate Status Button extension to enable the hibernate menu option on the desktop.

Suspend didn’t work properly. The system would suspend, but not wake up. I eventually solved this via this Stackexchange post. You need to add intel_iommu=off to the GRUB_CMDLINE_LINUX_DEFAULT options in /etc/default/grub and then update-grub.

I also took this opportunity to add DISABLE_OS_PROBER=true to the file, so we don’t have the option to boot to Windows from grub, which causes issues with Bitlocker, as mentioned above.

I also had to force an update of the installed Snaps so that Firefox was at the same version as on the 20.04 system, so that it would load my profile data. Presumably this would’ve happend automatically at some point anyway.