LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking
User Name
Password
Linux - Wireless Networking This forum is for the discussion of wireless networking in Linux.

Notices


Reply
  Search this Thread
Old 09-16-2019, 02:44 AM   #1
RedBlueYellow12
LQ Newbie
 
Registered: Aug 2019
Location: Melbourne, Australia
Distribution: Slackware
Posts: 27

Rep: Reputation: Disabled
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.
 
Old 09-16-2019, 04:36 AM   #2
business_kid
LQ Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware, Slarm64 & Android
Posts: 16,286

Rep: Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322Reputation: 2322
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!
 
Old 09-16-2019, 05:42 AM   #3
RedBlueYellow12
LQ Newbie
 
Registered: Aug 2019
Location: Melbourne, Australia
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: Disabled
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.
 
Old 09-16-2019, 07:07 AM   #4
mrclisdue
Senior Member
 
Registered: Dec 2005
Distribution: Slackware
Posts: 1,134

Rep: Reputation: 277Reputation: 277Reputation: 277
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,
 
Old 09-16-2019, 07:39 AM   #5
wpeckham
LQ Guru
 
Registered: Apr 2010
Location: Continental USA
Distribution: Debian, Ubuntu, RedHat, DSL, Puppy, CentOS, Knoppix, Mint-DE, Sparky, VSIDO, tinycore, Q4OS,Manjaro
Posts: 5,615

Rep: Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695Reputation: 2695
Quote:
Originally Posted by mrclisdue View Post
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.
 
Old 09-16-2019, 05:18 PM   #6
RedBlueYellow12
LQ Newbie
 
Registered: Aug 2019
Location: Melbourne, Australia
Distribution: Slackware
Posts: 27

Original Poster
Rep: Reputation: Disabled
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/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Need To Keep DHCPD From Deleting Nameservers Specified in Resolv.Conf joncr Slackware 14 04-22-2013 03:23 PM
router has 4 open ports even though i closed/disabled them amboxer21 Linux - Security 1 04-02-2012 09:29 PM
Missing nameservers reported by your nameservers sushantchawla2005 Linux - Server 6 02-02-2011 07:50 AM
i need to keep nwam from changing resolv.conf ( osol 2009.06 & OpenDNS nameservers ) joe262 Solaris / OpenSolaris 2 07-02-2009 12:42 PM
How to change nameservers WITHOUT editing resolv.conf??? zeeple Linux - Newbie 3 12-02-2008 01:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking > Linux - Wireless Networking

All times are GMT -5. The time now is 03:52 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration