I just tried to upgrade to 24.04 from 22.04 using sudo do-release-upgrade
(terrible idea, I know). The upgrade crashed, with a message about a "partial upgrade." I thought I'd managed to recover and finish the upgrade, as described below, but now my system can't boot. The init process seems to run with the expected boot image, but dmesg
includes twelve
Loading of module with unavailable key is rejected
messages right afterward. Then the boot fails with "Gave up waiting for root file system device."
I have "Enforce secure boot" enabled in my UEFI settings.
Can you suggest paths to making my system bootable again?
How I started the upgrade
I didn't use the -d
switch, so I don't know why the Jammy to Noble upgrade path was allowed to run. I'd been planning to use the Jammy to Mantic to Noble upgrade process described here. In Software & Updates, I chaged my new Ubuntu version notification preference from "long-term support versions" to "any new version." After confirming that the setting in /etc/update-manager/release-upgrades
had changed to Prompt=normal
(and maybe rebooting), I called sudo do-release-upgrade
, with no switches. I was surprised to be offered an upgrade directly to Noble, but I recklessly started it anyway.
When I first set up Jammy (a clean install), I installed a package from jammy-proposed
as part of this procedure to work around a wi-fi bug. I don't have a record of exactly how I did that, so it's concievable that I unknowingly installed other jammy-proposed
packages during later updates—maybe including a proposed Jammy to Noble upgrade path?
How I finished the crashed upgrade
I managed to restore my internet connection by manually updating systemd-resolved
. Then, after doing my best to confirm that all software sources and upgradable packages were labeled noble
rather than jammy
, I tried to complete the upgrade by calling
sudo apt --fix-broken installsudo apt full-upgrade
This seemed to succeed. I used dpkg -l
to confirm that the package linux-image-6.8.0-40-generic
was installed; this is the same kernel that was running at the time. When I try to boot, dmesg
show that BOOT_IMAGE=/boot/vmlinuz-6.8.0-40-generic
, as expected.
Booting the kernel in recovery mode doesn't help, but it shows something strange in the verbose startup messages: the line
starting version 249.11-0ubuntu3.12
This version number seems to belong to a Jammy version of systemd
. Based on my checks during the upgrade, I don't think I should have anything like that left on my system.
Tools available
I can boot Ubuntu 22.04 from a live USB flash drive.
I should have several older kernels installed, according to dpkg -l
output when I was trying to finish the upgrade. However, they don't show up when I choose "Advanced Ubuntu options" in the GRUB menu; I only see the 6.8.0-40 kernel.
I think I installed Timeshift and set it to do regular system state backups. I haven't yet checked whether I can access the backups from a live USB boot.
Epilogue
I did have Timeshift system state backups, so I decided to restore my system files from last week's snapshot right away, rather than trying any fix that could've interfered with restoration later. I ran Timeshift from Ubuntu 22.04 Live USB, and it worked like a charm! As far as I can tell (knock on wood), it set my system files back to just the way they were last Thursday, leaving my home directory untouched.
Anyone who wants to hear about running a Timeshift restoration from live USB is welcome to comment here to get my attention. The online documentation is pretty scant, especially for live USB mode, so I kept a pretty thorough log of how it worked for me.