I was performing a software update on Ubuntu 17.04, after downloading finiched, and during installation of the packages, a power failure caused an improper system shutdown. After that,Ubuntu no longer boots correctly. It starts booting, just up to the point where I should see the login screen (I even briefly see the mouse pointer), but instead of the login screen, the screen itself starts flickering on and off.

I'm guessing the issue somehow relates to a broken package regarding the GUI. I have rebooted into recovery mode and tried tu repair broken packages via dpkg. Several broken packages are identified,but they don't download, apparently because there's no internet access. I've tried the "enable network" option in recovery, but that doesn't help either.

What else can I do to get my system boting again?

  • When you tried repairing broken packages using dpkg, was one of the things you did "dpkg --configure -a"? – rplaughlin Oct 9 '17 at 20:27

It is possible to add a CD/DVD install disk as a repository

sudo apt-cdrom add

If you have a multidick set the above command can be repeated for each disk. However, reinstalling the desktop should only require the first.

Edit your /etc/apt/sources.list. Comment out all repos except the CDROM by putting a # as the first character in the line.

Next update apt and run aptitude

sudo apt-get update
sudo aptitude

** if you don't have aptitude, it should be on the install disk `sudo apt-get install aptitude'

In aptitude, arrow keys navigate up and down, and enter key selects highlighted option.
navigate down to tasks and select. then navigate to the desktop you want to install. press + key to select for installation.
Pressing "g" will bring up a window showing what is going to be done. Pressing 'g' a second time commits the changes. Pressing "q" quits the current window and will exit aptitude if in the top window.

After reinstalling your desktop, reboot. if you get the login, desktop and internet, then revert the changes to /etc/apt/sources.list. Uncomment the normal repos and comment out the CD. Do the following three commands to install the updates and bring you system back current.

sudo apt-get update
sudo apt-get upgrade
sudo apt-get dist-upgrade

The second link in the refences shows how to add an .iso to the repo. It is written for debian but should be adaptable to Ubuntu.

Add CDROM to sources -- https://help.ubuntu.com/community/AptCdrom
Add .iso to sources -- https://linuxconfig.org/add-iso-image-to-apt-sourceslist


One way to get Internet is boot a LiveUSB and do chroot:

sudo mkdir /mnt 
sudo mount /dev/sdAX /mnt
sudo cp -L /etc/resolv.conf /mnt/etc/resolv.conf

for a in dev proc sys ; do sudo mount --bind /$a /mnt/$a ; done
sudo chroot /mnt

... do all the fix ...


for a in dev proc sys ; do sudo umount /mnt/$a ; done
sudo umount /mnt

Personally I would reinstall. It's faster than fixing, and it preserves /home if you do it properly.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.