Ubuntu 21.04 not booting
Ubuntu 21.04 was working fine for a month or more, but today it doesn't boot. I am stuck on a black screen, with a blinking cursor at the top. Is this something I can fix, or must reinstall Ubuntu? I also see the same black screen in safe graphics mode I have the same problem.
Solution 1:
The question is pretty generic, but I'll post what happened to me on my Dell XPS 15 9550 (it has a non-contiguous RAM when loading the ramdisk). When selecting in "Advanced options for Ubuntu" on grub, selecting a kernel (or even recovery mode) after
Loading Linux 5.11.0-18-generic ...
Loading initial ramdisk ...
it stopped printing anything.
I could fix this fixed by making the size of the initial ramdisk
smaller.
There are two options, but in both you'll need to be able to boot up to rescue it. Try older kernels on the Grub menu or create a bootable USB and enter the machine with chroot (follow this guide https://howtoubuntu.org/how-to-repair-restore-reinstall-grub-2-with-a-ubuntu-live-cd if you don't know what a chroot is)
Make image smaller reconfiguring initramfs
Edit /etc/initramfs-tools/initramfs.conf
(with root user) and find
MODULES=most
replace it with
MODULES=dep
After this run
sudo update-initramfs -u
Reference for this last idea: https://bugs.launchpad.net/ubuntu/+source/initramfs-tools/+bug/1931024 (thanks to https://askubuntu.com/users/1283631/rupert-everton )
Disable NVIDIA drivers altogether
Uninstalling all "nvidia" DKMS drivers:
sudo apt remove nvidia-driver-* --purge
sudo apt autoremove --purge
Solution 2:
Can't add a comment to @morhook 's answer so I'll have to make a new one:
I also had the same problem where initrd.img was too large and I solved it by switching MODULES=most
to MODULES=dep
with a live ubuntu installer.
See this bug report: https://bugs.launchpad.net/bugs/1931024