resolv.conf has no nameservers on boot, even though I can see it add them.
Linux - Wireless NetworkingThis forum is for the discussion of wireless networking in Linux.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
resolv.conf has no nameservers on boot, even though I can see it add them.
Also, any changes I make to resolv.conf get overwritten, even though in /etc/rc.d/rc.inet1.conf I specify DHCP_KEEPRESOLV[4]=“yes”.
On boot, I can see it add 192.168.0.1 when getting up the wifi.
Killing dhcpcd and then starting a new one adds the proper nameservers. I use slackware 14.2, with no internet configurers like NetworkManager or wicd. I should probably specify this happened after a system update.
Last edited by RedBlueYellow12; 09-16-2019 at 03:52 AM.
As a work around, you can usually specify the name servers in your router, so if it just adds the router that's enough. If you can't reach the router, you won't get far!
Though it doesn't address the cause nor solution as to why the file clears and doesn't get repopulated on reboot, you could work around the issue by making resolv.conf immutable.
Hence, create resolv.conf with your desired nameservers, then:
Code:
# chattr +i resolv.conf
and the file will remain unchanged until you revert the immutable attribute.
Though it doesn't address the cause nor solution as to why the file clears and doesn't get repopulated on reboot, you could work around the issue by making resolv.conf immutable.
Hence, create resolv.conf with your desired nameservers, then:
Code:
# chattr +i resolv.conf
and the file will remain unchanged until you revert the immutable attribute.
cheers,
Ensure first that resolv.conf is a file, and not a link to a file in another location. If it is not a normal file, you might want to remove it and create it as a normal file and populate it with the settings you need.
Well, I found a thread that describes almost the exact problem I have, right down to the output of xxd /proc/`pgrep dhcpcd`/cmdline. I get /sbin/dhcpcd.-t.10.-C.resolv.conf.wlan0. I guess I’ll follow the instructions given in that thread, but I have no clue how to properly fix this. It might be a thing in my dhcpcd.conf
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.