How To Fix Ubuntu Linux OS Broken Upgrade and Boot Failure

During the Ubuntu Linux OS upgrade or update process, if your system powered off because of power failure or you shutdown the power due to the system unresponsiveness, then you will face problems like boot failure, blank screen and broken Ubuntu OS. In this tutorial we will see how to fix these type of problems during Ubuntu update. Using this method you can fix the broken update without losing your data and without reinstalling your OS.

Power on your system and in the Grub boot menu select Ubuntu, if it go to the Ubuntu login screen, then press (CTRL+ALT+F1). It will open tty1 (teletypewriters) virtual terminal console. If it will not work try (CTRL+ALT+F2), (CTRL+ALT+F3), (CTRL+ALT+F4), (CTRL+ALT+F5), (CTRL+ALT+F6) and (CTRL+ALT+F7). By default in Ubuntu linux OS, there are 7 ttys.

If you didn’t get the login screen after selecting Ubuntu in the grub boot menu, Then select the Advanced options for Ubuntu grub boot menu. After that select your previous working linux kernel version .(that is before the update process). Mostly the previous working linux kernel version will stay in the bottom of the list and it has lower version number. It will go to the Ubuntu login screen. Then try these combinations (CTRL+ALT+F1) or(CTRL+ALT+F2) or (CTRL+ALT+F3) or (CTRL+ALT+F4) or (CTRL+ALT+F5) or (CTRL+ALT+F6) or (CTRL+ALT+F7). It will open terminal.

Also Read:  QMidiPlayer Midi File Player

In the terminal console Enter your ubuntu username and hit enter. Then type your ubuntu user password. it will log in to your Ubuntu system. Then type the below command and press the enter key.

sudo rm /var/lib/dpkg/lock

Type your Ubuntu user password and hit enter. It will remove the lock files. After that run the below command.

sudo rm /var/lib/dpkg/lock

Then run

sudo rm /var/lib/dpkg/lock-frontend

Then run all the below commands one by one and wait till it completes.

sudo dpkg --configure -a

it will configure all broken ubuntu packages. then clean your system by using below command.

sudo apt clean

upAfter that run the below command. it will update the database of available packages try to fix the problem itself and install.

sudo apt update --fix-missing
sudo apt install -f

Then run the below command to configure all once again.

sudo dpkg --configure -a

Then

sudo apt upgrade
sudo apt dist-upgrade

After completing the all above steps, then use the below command to restart your system. Then it will go to your ubuntu login and log with your ubuntu Username and password.

sudo reboot

Note: It will not work on all systems.

If you liked this article, please subscribe to our YouTube Channel. You can also stay connected with us on X (Twitter) and Facebook.



This Post Has One Comment

  1. Ahmed

    Thank you. You saved the day for me and my ubuntu laptop.

Leave a Reply