LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Wireless Networking (https://www.linuxquestions.org/questions/linux-wireless-networking-41/)
-   -   resolv.conf has no nameservers on boot, even though I can see it add them. (https://www.linuxquestions.org/questions/linux-wireless-networking-41/resolv-conf-has-no-nameservers-on-boot-even-though-i-can-see-it-add-them-4175660963/)

RedBlueYellow12 09-16-2019 02:44 AM

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.

business_kid 09-16-2019 04:36 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!

RedBlueYellow12 09-16-2019 05:42 AM

I’m sure if I did that I’d be forever plagued with the thought that my machine would still be internally screwed. ocd, I guess.

mrclisdue 09-16-2019 07:07 AM

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,

wpeckham 09-16-2019 07:39 AM

Quote:

Originally Posted by mrclisdue (Post 6037215)
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.

RedBlueYellow12 09-16-2019 05:18 PM

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

https://www.linuxquestions.org/quest...nf-4175459003/


All times are GMT -5. The time now is 07:58 PM.