2

I have some issue with my dns configuration, so I googled and picked up a solution by 1) editing /run/resolvconf/interface/NetworkManager and 2) running sudo resolvconf -u.

This helped a little bit, but the change of dns is not permanent, because I noticed that the dns I added to /run/resolvconf/interface/NetworkManager always get lost in it after a reboot, and my dns would be reversed as before, which is simply 127.0.0.1, the original one.

So why the content of /run/resolvconf/interface/NetworkManager is changed? Or what's the mechanism behind its change?

philton
  • 33
  • 6
  • @jdthood didn't think it's a good idea to edit /etc/resolvconf/resolv.conf.d/head http://bit.ly/1KDG8vq I assume that's because it breaks the "pointer" logic of 127.0.0.1 in /etc/resolv.conf, which is used to call the specific dns configured for different connection in NetworkManager. But I'm not so sure about the assumption of this logic. For me Linux is a maze.. – philton May 30 '15 at 07:01

1 Answers1

3

The /run mountpoint is supposed to be a tmpfs mounted during early boot, available and writable to for all tools at any time during bootup.

What does this mean?

This means /run is tmpfs which means data on it is not a permanent storage, it looks like the /tmp, so you can depend on saving any data there since this dir will completely wiped with another data during booting. For that you are loosing your configuration everytime.

Please take a look in this Why has /var/run been migrated to /run?

Now for you, just add nameserver in the /etc/network/interfaces

dns-nameservers 127.0.0.1

read this Adding nameserver in resolv.conf

Else you can put it in /etc/resolvconf/resolv.conf.d/base

read this for more information

Maythux
  • 84,289