I tried to upgrade Xubuntu 20.04 LTS to 22.04 via the terminal (on the way to 24.04). It spat out some errors at the end. Stupidly didn’t take much notice of the details and attempted to fix things with an update/full-upgrade/autoremove (in the terminal). That added plenty pertaining to 22.04, didn’t throw any errors at the end, so I rebooted.
On reboot, chose Xubuntu from the grub menu and got a blank, black, unresponsive screen. Computer has booted as light is on and 22.04 could be right there, but I just can’t see it.
Rebooted by holding down the power button, chose ‘Recovery’ kernel from grub and it boots to a CLI. NO recovery mode options. I can login to the CLI, but if I issue, say, ‘startx’, throws an error about not installed (and I can’t install anything as can’t get online). Which gave me a clue.
When logged into the CLI, I issued ‘echo $XDG_CURRENT_DESKTOP’ and no output resulted. Suggests to me there is no installed desktop as should have shown ‘XFCE’.
Bottom line is, when I choose the recovery mode from grub menu, I’m not seeing the recovery options.
Next step: Boot from a Gparted USB so I’ve got a desktop, can dig around and get online. Maybe then I’ll have some hope.
Any help/ideas/suggestions greatly appreciated. Any further info required, just ask.
Your understanding is mostly correct, but the key issue is not recovery mode itself.
In recent Ubuntu/Xubuntu versions, recovery mode normally drops you into a CLI, not a menu. So that part is expected behavior.
What actually broke during the upgrade is the graphical stack:
XFCE
Xorg
display manager (lightdm)
That’s why:
Normal boot gives a black screen
startx is “not installed”
$XDG_CURRENT_DESKTOP is empty
Your system is booting, but the desktop environment is missing or broken.
If you can get internet access (via live USB + chroot, or enabling networking in CLI), the fix is usually to reinstall Xubuntu desktop packages rather than reinstall the whole OS.
I have no idea how to get internet going via CLI, so I’m going to try with a Gparted Live USB which will give me a desktop and internet access.
I should add here that I have been using what was once called Xubuntu-core and is now, I think, Xubuntu minimal for years, therefore, if I ‘reinstall Xubuntu desktop packages’, won’t that install Xubuntu desktop? As in, Xubuntu with all packages and everything that comes with a full install? Don’t want that.
So … could I simply install XFCE, Xorg and lightdm and all will be good, or more to it than that?
PS: Thanks for the tip about ‘recovery mode’ no longer being used in newer releases. That was seriously doin’ my head in! My machines have been rock solid for a long time, so been a long time since I’ve delved much ‘under the bonnet’, so unaware of some of the changes that have happened, obviously enough!
This is why I, personally, do not recommend using the full-upgrade command. It solves package conflicts by removing packages.
full-upgrade (apt-get(8))
full-upgrade performs the function of upgrade but will remove
currently installed packages if this is needed to upgrade the
system as a whole.
When a package is supplied as an argument, the package will be
installed prior to the upgrade action.
It seems, to me at least, that a conflict has been resolved by removing what I would call the desktop and the Friendly Recovery menu.
Do you have a separate Home partition? With a separate Home partition we can do a re-install without formatting the Home partition which will then not over write the files we have in the Home partition.
Some of us have a partition especially for data. Everything we do not want to lose we keep in the Data partition. A re-install is not so upsetting in this case.
Could you create a partition to transfer important files into using the live session? You might find it less trouble doing a fresh install of Xubuntu minimal then trying to replace what has been removed without adding extra stuff you do not want.
I expect if you had made note of the errors show it would have been related to the fact that you are trying to update an unsupported version to another unsupported version. Support for 22.04 Xubuntu is 3 years. With Ubuntu, you can sometimes access archives to do an upgrade but I don’t know if that is possible with Xubuntu.
You’re correct: reinstalling the full Xubuntu desktop meta-package would pull in a lot of components you probably don’t want if you’ve been using Xubuntu minimal / core.
In your case, a lighter and cleaner approach is to reinstall only the essentials:
xorg
xfce4
xfce4-goodies (optional)
lightdm
That should be enough to restore a working graphical login without turning it into a full Xubuntu install.
Using a live USB (GParted or Xubuntu) to get internet access and then chrooting or installing from there is a perfectly reasonable next step.
And yes — your understanding is spot on: full-upgrade likely resolved a conflict by removing the desktop stack, which explains both the black screen and the missing “recovery menu”.
Glad the recovery-mode clarification helped — things have changed a bit under the hood over the years
In your case, both Xubuntu 20.04 and 22.04 are both EOL. It is always recommended to stay on a current release. It may be possible to still do an unsupported upgrade, but normal upgrade behavior should not be expected. For one, the old release packages usually get moved somewhere else and you need to know how to get the correct packages. Others may have done this with success and may be willing to walk you through it, but I am in the camp of doing a back up and install a supported release.
Hi graymech. Yea, I have a home partition. I have actually been at this since … about 2007 I started using Ubuntu. First install was 7.04! I got to be pretty proficient and was a mod on the old Ubuntu Forums for awhile, so not my first rodeo, but I haven’t been ridin’ with this stuff for a long time so …
And thanks, yancek (do I remember that name from the forums?) To you both, I want to try and avoid a full reinstall.
MesterP, thanks for your clarification. Attempted to get a Gparted USB to boot but wouldn’t. Gets stuck on the screen just before it’s about to go to a desktop (with the legals and all). Currently downloading a xubuntu-desktop and see if I can get that to boot to a live desktop from USB. If that doesn’t work, not sure where to go from there.
How do I get online via CLI? I have an ethernet cable plugged in for this. If I can do that, I’d be able to install what you suggest and be back on the bike.
Thanks again. Starting to get a clearer picture of what’s gone on now and what you say makes sense. I did manage to boot from a Live Xubuntu desktop USB, but issue there is won’t mount the drive I want to install stuff on - double-click drive and shows as empty so figure it’s not mounted - and don’t know how to install stuff on the Xubuntu-mini partition in there rather than on the USB install by default even if it did!
Cheers and I’ll get cracking on the CLI method you’ve outlined.
Update: Not connected to net.
ip a
… shows my internet devices (lo loopback, wired and wireless);
… I attempt to reboot to the Xubuntu install and blank, black, unresponsive screen. Still something missing I guess.
Is that last command to install stuff intended to actually be typed into the terminal as two separate lines with the backward slash after the first line, as in your post?
Update: Now I can get to a root shell but no longer to the CLI! Just gives me a blinking cursor in the top left corner. And also, can no longer get online in the root shell for some odd reason. ‘dhclient’ does nothing. Strange.
So, ‘ip route’ gives
default via 192.168.0.1 dev enp2s0
192.168.0.0/24 dev enp2s0 proto kernel scope link src 192.168.0.158
Thanks for that. Looks that way, because starting NetworkManager got me online fine. No need for dhclient.
Here we go. Starting lightdm takes me to blinking cursor, left hand corner. Starting X throws ‘xinit: server error’. Connection refused. Back to the CLI cursor.
‘systemctl status lightdm’ gave a tree of stuff I didn’t understand, but no errors. Looks fine.
ubuntu-drivers devices
command: ubuntu-drivers not found, installed with apt install ubuntu-drivers-common
and
sudo ubuntu-drivers autoinstall
sudo: ubuntu-drivers: command not found
Should I go for ‘apt install ubuntu-drivers-common’ or will this give me a whole lot of what I don’t need?
The last command caused a riot of text, most of it seeming to involve the nvidia-driver-580, then stopped with
E: unable to correct problem, you have held broken packages
So, I ran
sudo apt install nvidia-driver-580
… and lo and behold, it installed without issue. Now it gets weird.
I tried booting to the new kernel and black, blank screen, but I can now boot into older kernels, BUT … gives me a regular login screen, login, takes me directly to Kodi! Which I had installed on one of those kernels at one point. I exit from that and takes me back to the login screen.
Reboot back to the recovery kernel of new install and get to ‘hit enter for maintanence’ and now the keyboard is dead! Can’t get into the CLI at all. Completely locked out. This is not good.
Whatever the ‘ubuntu-drivers-common’ and nvidia driver install did screwed something further.
PS: I CAN login to older recovery kernel CLI okay, just seems to be the new recovery kernel that kills the keyboard. If I could fix the ‘held broken packages’ it would be a positive. I’ll try some commands from here.
As the older kernel (5.8.0-050800-lowlatency) was booting into Kodi, I used that kernel’s recovery mode to uninstall kodi, booted into the older kernel and voila! A desktop. Not what it was, but I’m typing this from the broken laptop now, albeit not from the 5.15.0-16* kernel. Despite the fact this is an older kernel I’m on, I appear to be running 22.04 Jammy. Some output.
$ lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 22.04.5 LTS
Release: 22.04
Codename: jammy
Some icons are missing, but internet (wired and wireless) and everything else seem to be working as per normal. (And I’ve managed to install Synaptic and the missing Network Manager icon).
Hasn’t changed anything regarding my original problem, unfortuately; when I boot into the 22.04 kernel that was installed during the upgrade, blank screen.
Appears the 5.15.0-16* kernel is missing the graphics drivers. Still. And can’t get into CLI via that kernel’s recovery mode booting that at all (dead keyboard).
Here’s some output re. graphics from the old kernel I currently have a desktop in.
The nvidia-driver-580 (had a dig about and it appears the nvidia-driver-590 is the latest) is the one I installed manually last night. Also guessing some things aren’t installed re. Nvidia either - or not installed correctly - as my Nvidia Settings GUI is considerably watered down (should be a heap of other options and info there).
Firstly, thanks to all who attempted to help me with this, but in the end, as I couldn’t get in to the new kernel - not even via recovery in the end - and as the kernel I could get in to was so broken it may have taken a few years to resurrect it, if ever, I did a clean install of Xubuntu-minimal and I’m using it to tap this. All running perfectly.
No idea re. the protocol, but I have marked this thread as ‘Solved’, even though the original issue wasn’t.
Just a note on this; in the clean Xubuntu-minimal 24.04 install I just did, hitting recovery option from the grub menu does indeed take me to the regular recovery menu, as per normal and as I was expecting originally.