I recently upgraded my PC to Ubuntu 14.04. I then experienced major problem in DNS resolution that did not work anymore. I finally found the following: in /etc, there is a 'resolv.conf' wihich is a symbolic link to ../run/resolvconf.resolv.conf. On my system this is an empty file. However, '/run/resolvconf/resolv.conf' is there. I manually reated the symbolic link to /run/resolvconf/resolv.conf. That works perfectly. Howevrer the original link does not work. To illustrate this, I created two symbolic links in '/etc':

marc@marc-Vostro-420-Series:/etc$ ls -irl dns.*
787036 lrwxrwxrwx 1 root root 27 aoû 29 17:50 dns.ok -> /run/resolvconf/resolv.conf
787080 lrwxrwxrwx 1 root root 29 aoû 29 17:51 dns.nok -> ../run/resolvconf/resolv.conf
marc@marc-Vostro-420-Series:/etc$ cat dns.ok
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
marc@marc-Vostro-420-Series:/etc$ cat dns.nok

As you see, the second one is empty. Now, the question: Why is the original symlink pointing to the '../' (wrong) version?

| improve this question | | | | |
  • The relative symbolic link (the one you say is wrong) works fine for me. What's the output of ls -l /etc/../run/resolvconf/resolv.conf? Can you cat that file directly? – muru Aug 30 '14 at 15:41
  • marc@marc-Vostro-420-Series:/etc$ ls -l /etc/../run/resovlconf/resolv.conf ls: impossible d'accéder à /etc/../run/resovlconf/resolv.conf: Aucun fichier ou dossier de ce type But marc@marc-Vostro-420-Series:/etc$ ls /run/resolvconf/resolv.conf /run/resolvconf/resolv.conf – Marc Vanhoomissen Aug 31 '14 at 9:56
  • There's a typo: resovlconf instead of resolvconf in the first command you ran. – muru Aug 31 '14 at 10:06
  • Right. Here the right version + output of cat (both versions): marc@marc-Vostro-420-Series:/etc$ ls -l /etc/../run/resolvconf/resolv.conf -r--r--r-- 1 root root 0 avr 23 2012 /etc/../run/resolvconf/resolv.conf marc@marc-Vostro-420-Series:/etc$ cat /etc/../run/resolvconf/resolv.conf – Marc Vanhoomissen Sep 1 '14 at 6:16

This is normal if your DNS is being managed by the resolveconf package (the default for 14.04). If you need to add nameservers, add them to /etc/resolvconf/resolv.conf.d/base sudo nano /etc/resolvconf/resolv.conf.d/base and restart resolvconf service resolvconf restart and it will rebuild the /etc/resolv.conf "file".

| improve this answer | | | | |
  • Why is it normal that the link dns.nok, equivalent to the one created by sudo dpkg-reconfigure resolvconf points to an empty file and the other one (dns.ok) points to the file I would have expected to? – Marc Vanhoomissen Aug 30 '14 at 7:55

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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