1

This question already has an answer here:

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.

marked as duplicate by karel, Pilot6, Charles Green, Elder Geek, Eric Carvalho Feb 28 at 18:23

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • Alright, I've got it working (sort of) and i can now boot to Ubuntu. However, it seems my keyboard is not working Nor is ethernet. – alex416 Feb 18 '17 at 9:47
0

Try: sudo dhclient -v -4

This should do the trick and fix your connection.

If dhcp not gives you proper dns server, try to set it manually by:

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.