3

I had an account here but Launchpad login is failing, so I'm using a new one. Not my Ubuntu-day..

So, I launched the 24.04 upgrade from 22.04, using the GUI updater.

The whole preparation and download went fine. However, during the installation/configuration process, I got a Download failed error and I noticed the whole Network Manager had disappeared from Gnome Shell. Pretty weird but not concerning I thought, since the packages should have been downloaded already.

I closed the error window, and then the updater closed suddenly (crashed?), apparently while trying to revert the changes.

At this point I probably made a mistake, as I tried to restart the system.

The system restarted, but now the situation is:

  • I'm in a terminal - gdm.service is not found
  • no internet connection - ethernet card recognized but won't connect. dhcp not installed
  • lsb_release -a shows I'm still on 22.04/jammy
  • apt upgrade/dist-upgrade wants to remove a long list (>100) of packages
  • dpkg --configure -a does nothing
  • do-release-upgrade simply fails to connect

Could I ask for help on what to check/how to proceed? Even if I can find a LiveUSB I wouldn't know what to do.

If there's similar questions or other resources I'd kindly ask for a link, I only have the 5" of my smartphone available at the moment for reading/searching.

poomerang
  • 393
  • 2
  • 10

1 Answers1

1

The solution was essentially to follow the indications of the first answer here, with some tweaks because of the missing connection.

So, first verify that /etc/apt/sources.list and /etc/apt/sources.list.d/ubuntu.sources have the word noble instead of jammy. The link above has the commands to fix that.

Then, try sudo apt full-upgrade. If it works, great! If some packages need to be downloaded and the connection is not working (as in my case), chrooting from a LiveUSB is necessary for the download only - some updates may not work from chroot, especially e.g. grub.

After launching the LiveUSB and setting up the network, mount the internal harddrive, copy the file /etc/resolv.conf from the LiveUSB to it (to 'transfer' the connection, ref. here), and chroot in it (e.g. sudo chroot /media/internalHD).

If internet is now working (try ping), use

sudo apt --download-only full-upgrade
sudo apt install --reinstall --download-only ubuntu-desktop^ 

Then boot into the main system and repeat these commands without --download-only. This should restore a working desktop.

Programs may be missing because this is not the calculated upgrade, just a fix. You'll have to install them manually.

poomerang
  • 393
  • 2
  • 10