0

In the process of upgrading to the latest Ubuntu 18 build, I am now stuck working in recovery terminal mode trying to reinstall GDM3 and ubuntu-desktop. problem is I can ping outside IP addresses, but cannot resolve names (ie. when running apt-get install it will not resolve us.archives.ubuntu.com) I have input 3 dns nameservers in my Wired Connection 1 file in NetworkManager. Rebooted and still cannot resolve names. THoughts?

  • Did you switch OFF the DNS AUTO setting in your Wired Connection? What are the contents of an unmodified /etc/resolv.conf? Are you running dnsmasq AND systemd-resolve? – heynnema Nov 27 '18 at 15:01
  • @Joshua Mozdzier Let us know if you solved the problem. If yes how. – VeeJay Nov 28 '18 at 12:38
1

This helped me in a similar situation.

As Official Ubuntu Documentation says:

If you require DNS for your temporary network configuration, you can add DNS server IP addresses in the file /etc/resolv.conf. In general, editing /etc/resolv.conf directly is not recommanded, but this is a temporary and non-persistent configuration.

This will only work for this session and you can reinstall GDM3 and ubuntu-desktop. The file will be overwritten on reboot. So check the DNS settings after reboot in graphic mode.

CMD:

cat /etc/resolv.conf

If no DNS in there try:

echo "nameserver 8.8.8.8" >/etc/resolv.conf

This worked for me in a situation like this.

If you want changes to persist see this.

  • 1
    /etc/resolv.conf should not be edited/modified manually. It says so right in the file itself. Whatever you manually place there will get overwritten. – heynnema Nov 27 '18 at 15:05
  • @heynnema edited as suggested. – VeeJay Nov 28 '18 at 12:24
  • @heynnema it does not matter, as this answer solves the question exactly. While you are in recovery mode you get to use the Google DNS, then you can reboot and your temporary change gets correctly reverted. – Andrea Lazzarotto Nov 29 '18 at 10:06
  • @AndreaLazzarotto it doesn't solve why the DNS problem in the first place. If you note my comment to the original question... which never got a reply... was that OP set DNS addresses in the GUI for Wired Connection, but probably forgot to set AUTO to OFF. Another possibility is that OP is runing dnsmasq and systemd-resolve at the same time... without editing a certain pref... and DNS probably won't work then either. I'd wager that after reinstalling gdm3 and ubuntu-desktop and rebooting, that the DNS problem still exists. – heynnema Nov 29 '18 at 14:25
  • @heynnema I can relate on the fact that DNS almost never works in recovery mode (but it does while booting normally). This is probably due to the recovery mode being a stripped down boot that does not start all services. Hence a temporary fix might be exactly what is needed. – Andrea Lazzarotto Nov 29 '18 at 16:49

Your Answer

By clicking "Post Your Answer", you acknowledge that you have read our updated terms of service, privacy policy and cookie policy, and that your continued use of the website is subject to these policies.

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