How can I recover Ubuntu after a failed upgrade that leaves a black screen?
#1
I just tried to update my Ubuntu install from 22.04 to 24.04 using the command line, but the process failed halfway through. Now my system boots to a black screen with a blinking cursor. I can get to a tty terminal, but I’m not sure what to do next to recover my installation without losing my home folder.
Reply
#2
That sounds rough. Since you can reach a tty, start by fixing the upgrade first. Run sudo dpkg --configure -a then sudo apt-get -f install. After that run sudo apt-get update and sudo apt-get upgrade. If the upgrade completes, reboot and see if the system comes up. If the boot still stalls with a black screen, try reinstalling the desktop meta package: sudo apt-get install --reinstall ubuntu-desktop. If you suspect the kernel, you can install a known-good one: sudo apt-get install --reinstall linux-image-generic linux-headers-generic. If you’re worried about data, consider backing up from the live USB before making more moves.
Reply
#3
Grub menu path: reboot, hold Shift to access the menu, choose Advanced options for Ubuntu, then Recovery mode. Enable networking if possible, drop to the root shell, remount the filesystem rw, and run dpkg --configure -a and apt-get -f install. Then apt-get update and reboot. If that doesn't help, boot from a live USB and chroot to repair packages. The goal is to repair without wiping data.
Reply
#4
I upgraded once and ended up with a black screen; I tried a few things and ended up doing a clean reinstall, but I kept a copy of my data on a separate disk and it saved me. If you want to avoid reinstall, you could try reinstalling the desktop stack or the login manager: sudo apt-get install --reinstall gdm3 or lightdm, then update-grub. I can't promise it will fix it.
Reply
#5
Could the real issue be the login manager not starting instead of the upgrade failing?
Reply


[-]
Quick Reply
Message
Type your reply to this message here.

Image Verification
Please enter the text contained within the image into the text box below it. This process is used to prevent automated spam bots.
Image Verification
(case insensitive)

Forum Jump: