/run/resolvconf/resolv.conf gets erased each time I restart, and I can't use internet without it (16.04)

Solution 1:

You should restore the resolv.conf symbolic link and add required nameservers to /etc/resolvconf/resolv.conf.d/base. Follow these steps:

  1. Reinstall resolvconf package:

    $ sudo apt-get -o Dpkg::Options::="--force-confmiss" install --reinstall resolvconf
    
  2. Add required nameservers to /etc/resolvconf/resolv.conf.d/base:

    $ sudo bash -c 'echo "nameserver 8.8.8.8" >> /etc/resolvconf/resolv.conf.d/base'
    $ sudo bash -c 'echo "nameserver 8.8.4.4" >> /etc/resolvconf/resolv.conf.d/base'
    
  3. Regenerate resolv.conf:

    $ sudo resolvconf -u
    
  4. Restart your network interfaces:

    $ sudo ifdown -a ; sudo ifup -a
    

Solution 2:

I think the resolv.conf is not updated automatically. You can reconfigure it

sudo dpkg-reconfigure resolvconf