1

What happened

I was working on my laptop while it upgraded from 15.10 to 16.04 (which I admit was a mistake) when suddenly the Unity overlay disappeared and the only thing on screen was the Firefox browser window. I switched to a new terminal, logged in and tried to run sudo service lightdm restart but instead of restarting correctly, the screen started turning on and off repeatedly, which freaked me out, so I physically turned off the PC.

Long story short: I forced a shutdown halfway through the Ubuntu upgrade.

Ever since, any attempts of logging in normally have been met with a solid black screen and the idle whirring of the CPU fan.

What I have tried

I have tried the recovery mode boot up, but no luck (The log does greet "Welcome to Ubuntu 16.04 LTS!"). I tried out each option that seemed useful:

  • dpkg goes through the packages as advertised, but strangely enough it always locks up on some Braille package until I do Ctrl+C, at which moment it spouts some error messages and then I think throws me into the normal boot.
  • failsafeX results in a similar situation to the normal boot: a black void.
  • fsck says the single partition I have is a-ok.
  • grub seems to get a bunch of stuff. Don't know if it searches locally or fetches from the internet.
  • network didn't work I think.

I tried following this answer but couldn't do the sudo part because the filesystem was mounted as readonly. So I ran fsck which mounts as RW and tried again.

This time, after running apt-get autoremove it went through many packages (Setting up foobar (X.Y.ZubuntuN) ...), sometimes installing packages, which I assume is the usual behavior. One thing to note though is it kept getting stuck several times, so I had to Ctrl+C it out of processing the current package. It finally ended on "Processing was halted because there were too many errors.".

While this question seems to mention some of the graphics problems I've been experiencing... I have Intel HD Graphics, not Nvidia. I'll keep looking into it.

5
  • If you've solved your question, you might consider marking it as solved in one way or another. Maybe answer your own question by showing the steps you took to solve the problem incase others have the same issue. May 4, 2016 at 0:41
  • I considered doing it, but thought it would be a bad idea since I didn't really grasp why what I did worked... sorry ;-)
    – JoseHdez_2
    May 4, 2016 at 0:44
  • Whether or not you know why, people will still think the question isn't solved. May 4, 2016 at 0:45
  • Agreed. Seeing as things are, I'll answer my own question, even if I think it will be of little value to the community :-/
    – JoseHdez_2
    May 4, 2016 at 0:46
  • Trust me, if someone else had this problem, and you managed to solve it somehow, anything you can add will help them too. May 4, 2016 at 0:48

3 Answers 3

0

One solution, maybe not the best, but one I would try, is to just reinstall over your broken system, without removing your personal files.

Get your hands on a fresh 16.04 Installation Medium (not the old version) and prepare your computer. Making a backup of your /home folder is always a good idea.

You can take a look at this link for more information on how to do this properly.

The basics are this:

  1. Install Ubuntu like you usually would.
  2. When choosing the installation type, try a "install over" or "upgrade" option. The description of the option should say something like "Documents, Music, and other personal files will be kept..."
  3. Install the system as usual.

The key part about this is to not format the home folder. If you have a separate partition for /home, don't format it. If you don't have a separate partition, don't format /, but select it as the root installation location.

Benefits of this method?

  • Easy
  • Reliable
  • Almost guarenteed to work
  • You will keep all your files and preferences in your home folder

The downsides?

  • You lose your installed applications (you'll have to reinstall them)
  • Application settings or configurations that aren't found in your home folder will be reset (most applications put settings somewhere in /home, so this will only be the case for a few applications)
  • Might take a while depending on the speed of your computer
1
  • Thanks Zach, but thankfully in this case I didn't need a do-over. I'll keep this in mind if I really screw up next time (there will be a next time, no doubt)
    – JoseHdez_2
    May 4, 2016 at 0:39
0

You can use the Live-DVD/USB to fix your system.

Boot the Ubuntu Live-DVD/USB.

Open a terminal,

Press Ctrl+Alt+T

Type the following:

exec sudo -i

Use the fdisk utility to list the partitions on a device.

Type the following:

fdisk -l

suppose fdisk informed that / is /dev/sda1

Type the following:

mount /dev/sda1 /mnt
mount --bind /dev /mnt/dev
mount --bind /dev/pts /mnt/dev/pts
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt
nano /etc/resolv.conf

Add OpenDNS name servers to /etc/resolv.conf file:

nameserver 208.67.222.222
nameserver 208.67.220.220

Ctrl+O Save file.

Ctrl+X Close nano.

Now type the following:

apt-get update
apt-get -f install
apt-get dist-upgrade
apt-get autoremove
dpkg --configure -a
apt-get clean
umount /dev/sda1
reboot 

Note: change /dev/sda1 for your / partition

0

In the end, doing apt-get autoremove on the RW filesystem and then rebooting seems to have fixed enough so that I could log in graphically again (albeit without Unity components showing up, but that was a different problem). I'll leave the question up, even if it's messy and goes into tangents, in case it might help anyone with a similar problem.

Thanks to Zach and kyodake for their helpful answers, but thankfully I didn't have to resort to reinstalling the OS or using the Live CD tools... this time.

1
  • This is what worked for me; I haven't accepted it yet since the system requires a 2-day margin before accepting one's own answers. Will do as soon as I can.
    – JoseHdez_2
    May 4, 2016 at 0:55

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .