Ubuntu 20.04 boots to black screen with mouse pointer
Solution 1:
You could boot into a working kernel (you mentioned you have that) and
- Try debugging, and then fixing the problem
- Try to come to a clean state, regardless of the problem
Debugging the problem
To start debugging the causes of the problem, use journalctl
and other commands.
For instance,
$ journalctl --list-boots
lists all available logs. To see log for the previous boot,
$ journalctl -b -1
By default, journalctl
pages output. If you want to avoid that, e.g. to grep
or wc
the output, and/or logs are very long, use
$ journalctl --no-pager -b -1
or flag -e
to go straight to the end (but you may not have the complete log available for scrolling back).
To see the kernel ring buffer, use dmesg
.
Important flags are: -e
or -T
to use human-readable times, -P
to avoid paging, -H
for a human-readable output. See the complete list here.
Possible straight solution
Whenever a newer kernel becomes available, an update will install it and set it as the default option in grub. So your system may be fully functional again, regardless of the problem.
Post the output of
$ uname -a
$ lsb_release -a
to check this.
Sources
- https://www.loggly.com/ultimate-guide/using-journalctl/
- How to find previous boot log after Ubuntu 16.04+ restarts?
- https://unix.stackexchange.com/questions/159221/how-do-i-display-log-messages-from-previous-boots-under-centos-7
- https://unix.stackexchange.com/questions/181067/how-to-read-dmesg-from-previous-session-dmesg-0
- https://superuser.com/questions/565927/differences-in-var-log-syslog-dmesg-messages-log-files
Solution 2:
From a TTY terminal (the ones you said you can access) try running
sudo apt update && sudo apt upgrade
I know this sounds like an overly simplified solution, but it will most likely upgrade your kernel. If it doesn't work, keep trying every few days until yuo get a new kernel build. It will say so in the output.
Solution 3:
Rather than give instructions on how to repair this, let me explain what probably happened.
Very likely, either you installed updates, or unattended-upgrades installed updates, and the updates included a new kernel which failed to install for some reason. Most likely reasons would be the disk was full (or maybe just /boot was full), or the install was interrupted somehow and didn't complete.
The correct solution at this point would have been to select an older kernel until you find one that boots correctly, and then check logs and correct the error and then rerun updates. That should have fixed this. If an older kernel booted successfully, then there would be no need to reformat -- you could even have just kept using the system normally using the older kernel.
Since you have already reinstalled, there are probably no logs left to check, so it's hard to say exactly why it failed.