Ubuntu – Ubuntu 14.04 hangs on “Restoring resolver state…”

14.04bootdriversgrub2nvidia

I have A VM with guest Ubuntu installed which I use for development. Everything was setup and working nicely until yesterday evening when I rebooted the VM (updates were installed during that session, if I recall correctly). The booting splash screen showed up and just hung there.

I looked into these questions and their solutions and high rated answers:

… but with no success.

If I press Right Shift when the VM fires up and choose to use Ubuntu with older version of kernel (latest shown 3.19.0.-51-generic, first older 3.19.0-49-generic), then I successfully get to the login screen but can't login with my credentials, it just keeps throwing me back to the login screen. TTY login works.

I used the recovery menu to drop to root shell and reinstall nvidia-current package, removed "quiet and splash" to see what's going on, cleared /tmp directory as suggested in one answer, updated grub, but with no success. Is it possible to rollback the updates somehow? Here's where booting hangs:

enter image description here

The VM is running on an SSD disk partition, 60GB of space, with ~20GB still free. I'm using an NVidia graphics card.

If reinstalling can be avoided, it would be really appreciated.

Best Answer

I kind of got this working with help from a friend - by that I mean we managed to get past the "Restoring resolver state..." and successfully log in.

The solution was two-part. I removed all packages related to latest Linux kernel (3.19.0-51) since that got updated with the automatic update that messed things up.

Use tail -n50 /var/log/apt/history.log to see what got updated (adjust -n as needed).

This got me to the login screen, but then I was unable to login. I checked for issues with "Login loop" here on askubuntu.com, but it turned out permissions were okay and the issue was not with lightdm. One of the answers pointed to an issue with graphics, so I looked around for a way to update the graphic drivers without using nvidia-current package.

I followed instructions in this OP http://ubuntuforums.org/showthread.php?t=2263316 with a couple of differences; I didn't pull the latest linux kernel packages and didn't just remove nvidia drivers, I purged them (copied from the link):

  1. sudo gedit /etc/default/grub change line "GRUB_CMDLINE_LINUX_DEFAULT..." to GRUB_CMDLINE_LINUX_DEFAULT="nouveau.blacklist=1 quiet splash nomodeset" #(forces low-level graphics to ensure putty does not give black screen)
  2. sudo update-grub2
  3. sudo apt-get purge nvidia* && sudo apt-get autoremove
  4. sudo reboot

After the reboot I was able to login. I proceeded to install latest nvidia drivers from a .run file as per instructions, but that just threw me back to the login loop issue.

I purged nvidia drivers again, and was able to log in successfully. The downside now is that I can't seem to use the "Cycle multiple monitors" feature of VMWare Player (could be vmware tools issue, but don't want to mess with it now), but at least I can get back to work.

I'll update this answer if I get a solution that works with latest updates.