tl;dr
I broke my OS by removing too many packages, and I fixed it by booting into recovery mode, repairing broken packages, and reinstalling the desktop environment.
Don't worry, this is not a tutorial on how to break your OS, but rather a quick guide on how to fix it if you do. Please note that this guide is very specific to my issue, but it might help you if you're facing a similar problem.
I recently had issues with AppimageLauncher and AppImage applications on my Ubuntu installation, and I had to do some troubleshooting to fix it. At this point it seems that I made my app images work again, but for some reason my file manager (Nautilus) was gone, and I had to reinstall it. I tinkered around on a chrome extension and at some point I decided to stop and close everything.
The next day when I opened my laptop and my login screen was frozen. So the next thing I tried was a reboot, but at this point the system was not loading anymore. I assume that sudo apt autoremove
has removed more than I wanted the day before.
Step 1: Restart and enable the grub menu
If you're unable to boot into Ubuntu, you may need to restart your computer and enable the grub menu.
To do this, restart your computer and press Esc
key after the BIOS screen disappears.
This should bring up the grub menu, which will allow you to boot into recovery mode.
Step 2: Boot into recovery mode
Once you've enabled the grub menu, you should see a list of options.
GNU GRUB version 2.06
│ Ubuntu
│ Advanced options for Ubuntu
│ UEFI Firmware Settings
│
Select the option that says Advanced options for Ubuntu
and then select the option that says recovery mode
for the kernel version you want to boot into. Typically, you'll want to select the latest kernel version.
GNU GRUB version 2.06
│ Ubuntu, with Linux 6.8.10-060810-generic
│ Ubuntu, with Linux 6.8.10-060810-generic (recovery mode)
│ Ubuntu, with Linux 6.7.5-060705-generic
│ Ubuntu, with Linux 6.7.5-060705-generic (recovery mode)
│ Ubuntu, with Linux 6.5.0-27-generic
│ Ubuntu, with Linux 6.5.0-27-generic (recovery mode)
|
Step 3: Repair broken packages
Once you've booted into recovery mode, you should see a menu with several options.
Recovery Menu (filesystem state: read-only)
│ resume Resume normal boot
│ clean Try to make free space
│ dpkg Repair broken packages
│ fsck Check all file systems
│ kernel Try to load a different kernel
│ network Enable networking
│ root Drop to root shell prompt
│ system-summary Show system summary
|
First thing you will notice on top is that the filesystem is read-only. Depending on the options you selected, the filesystem will be remounted as read-write.
Select the option that says dpkg
to repair broken packages. This will attempt to fix any broken packages on your system. Once the repair process is complete, you can reboot your computer and hopefully your system will boot up normally.
Step 4: If the issue persists, try reinstalling the desktop environment
After rebooting, if the issue persists, you may need to reinstall the desktop environment. To do this, boot into recovery mode again and select the option that says root
to drop to a root shell prompt.
Once you're at the root shell prompt, you can reinstall the desktop environment by running the following command:
apt-get install --reinstall ubuntu-desktop
This will reinstall the Ubuntu desktop environment, which should hopefully fix the missing packages that are causing the boot screen to freeze. This fixed my issue, and after rebooting my system, everything was back to normal.
Conclusion
Starting the day with a frozen boot screen can be frustrating, especially if everything was working fine the day before. The Linux ecosystem has a lot of tools and options to help you troubleshoot and fix issues like this, so don't panic if you run into problems. Hopefully this guide has helped you fix your frozen boot screen on Ubuntu, and you can get back to work without any further issues.