How to repair Ubuntu installation after interrupted dist-upgrade without losing any custom settings?
Solution 1:
Do this:
- Switch on your computer.
- Press and hold the Shift key, which will bring up the Grub menu.
- Select the line which starts with
Advanced options
. - Select the line ending with
(recovery mode)
- Press Enter and your computer will begin the boot process.
Your computer should display a menu with a number of options.
One of the options will be Check all file systems
:
- Press Enter with this option highlighted.
- One of the options will be
Enable networking
. - Press Enter with this option highlighted.
Next, other of the options will be Drop to root shell prompt
.
- Press Enter with this option highlighted.
Your computer should boot in a terminal enter the following commands there:
mount -o remount,rw /
mount --all
dpkg --configure -a
apt-get update
apt-get -f install
apt-get -m install
apt-get dist-upgrade
apt-get install --reinstall ubuntu-desktop
apt-get autoremove
apt-get clean