1

So the last time I was using Ubuntu 16.04, a message popped up there was a system error. No other information. After shutting down, the system will no longer boot. A black screen flickers for several seconds, then nothing. My best guess is this is an Nvidia graphics driver issue.

From recovery mode, I could use the command line to uninstall the nvidia drivers and install replacements. However I need to enable networking to be able to apt-get install the replacement drivers.

When I choose "enable networking" in recovery mode, I get the message

/etc/resolv.conf no such file or directory

I have tried

sudo dpkg-reconfigure resolvconf

I get a prompt to reboot. After I reboot, I'm back at square one, and get the same message /etc/resolv.conf no such file or directory

Anyone know what this is about or have any leads? I would really appreciate help I have take home finals and tons of homework I have to finish and it's all on this computer. Thank you!

He-Man
  • 21

3 Answers3

5

I had the exact same problem. Solved it by:

  1. Booting into a LiveUSB of Ubuntu, by selecting to test it out without installing. I fortunately still had the USB drive I used to install Ubuntu 16 a month ago. For my Dell I just pressed F2 on boot with the USB plugged in. Make sure you then log on to a network.
  2. Roughly followed these instructions to chroot into the partition with my regular Ubuntu install. Make sure to check which partition has your Ubuntu installation using sudo fdisk -l /dev/sda

    cd / sudo mount -t ext4 /dev/sda6 /mnt

  3. Copy over '/etc/resolv.conf' so you can use the network on your chrooted system.

    cp -L /etc/resolv.conf /mnt/etc/resolv.conf

  4. Chroot into mounted file system

    chroot /mnt /bin/bash

  5. Followed these instructions to fix driver issues.

    sudo apt-get purge xorg-* xserver-xorg sudo apt-get install xorg xserver-xorg sudo dpkg-reconfigure xorg

  6. Then exit out of chroot, unmount partition, and reboot into your original Ubuntu installation.

    exit umount /mnt reboot

Hope this helps!

ksil91
  • 51
  • Almost worked, but I had to use sudo to chroot, then I couldn't install any packages or do sudo apt-get update from the chroot. At least it let me copy the resolv.conf file. But then when I rebooted, the resolv.conf was gone. – wordsforthewise Nov 25 '17 at 20:33
  • Also not sure about this, but I think you want to connect to a network before copying the resolv.conf file. Then there are also a number of other mount commands on that first link you posted that maybe need to be executed. After doing those things, I could connect to the internet from the chroot. – wordsforthewise Nov 25 '17 at 20:41
  • This works finally! – Sandeep C Feb 27 '18 at 13:10
1

Thanks for the responses guys. This is what I ended up doing:

echo "nameserver 8.8.8.8" | sudo tee /etc/resolv.conf >/dev/null

From command prompt after booting into recovery mode. This got me the network access I needed.

prime-select intel

This is an nvidia command. Ultimately this is what let me get back into Ubuntu. Still working on resolving the driver issue. Just started getting new "system error detected" messages too so I'll be working on this more soon I'm sure.

MadMike
  • 4,244
  • 8
  • 28
  • 50
He-Man
  • 21
0

You should be fine after enabling networking. when it comes back, go to root console, and do ifconfig to see what ip address has been assigned to the network adapter.

Type exit at the root console, and choose resume on the menu.

Additionally, at this point I needed to reconnect to my vm from a remote console, and added something like the following to /etc/network/interfaces file.

auto ens33:1
iface ens33:1 inet static
      address xx.xx.xx.xx
      netmask 255.255.255.0
      gateway yy.yy.yy.yy
      dns-nameservers xx.xx.xx.xx
      dns-search mydomain.local
dajavex71
  • 474