2

I'm trying to rescue my Ubuntu 16.10 server installation, since I have accidentally removed the kernel...

Now that I've booted to a usb, and run a shell with the mounted file-systems, DNS does not seem to want to work, ping google.com returns "unknown host" and if I ping 192.168.1.1 (gateway) it works fine, and if I ping 8.8.8.8 it also works fine, however I cannot do much without DNS.

screen showing APT connection errors

There is an image of the errors.

So, my question is: how can I restore my DNS so I can ultamately restore my server?

Thanks.

Zanna
  • 72,312
alex416
  • 31

1 Answers1

3

Try: sudo dhclient -v -4

This should do the trick and fix your connection.

If dhcp does not give you the proper dns server, try to set it manually like this:

sudo echo 'nameserver 8.8.8.8' > /etc/resolv.conf

jmarina
  • 1,075