LinuxQuestions.org
Review your favorite Linux distribution.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 03-11-2012, 08:20 AM   #1
sluge
Member
 
Registered: Dec 2006
Location: Russia,52
Posts: 128

Rep: Reputation: 6
Question my resolv.conf is empty after reboot


Hello
I setup nameserver in my RHEL 6.2 in cat /etc/resolv.conf

nameserver 192.168.0.1

but after reboot the nameserver string was deleted from resolv.conf !
Why? What service clear my resolv.conf?!
 
Old 03-11-2012, 08:42 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
It is probably being done by the DHCP client system. Possible solution here.

EDIT: or the RHEL way here.

Last edited by catkin; 03-11-2012 at 08:44 AM.
 
Old 03-12-2012, 01:49 AM   #3
sluge
Member
 
Registered: Dec 2006
Location: Russia,52
Posts: 128

Original Poster
Rep: Reputation: 6
Quote:
Originally Posted by catkin View Post
It is probably being done by the DHCP client system. Possible solution here.

EDIT: or the RHEL way here.
I don't use DHCP, only static IP
 
Old 03-12-2012, 03:00 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
Quote:
Originally Posted by sluge View Post
I don't use DHCP, only static IP
Ah. That's going to require some detective work.

I would add a boot script that is run at every startup and shutdown level that copies /etc/resolv.conf to try and get a handle on when it is being modified. Because this may need to be done when only the / file system is mounted, I would write to the /etc/ directory rather than the obvious /tmp (unless /tmp is on / and is not emptied durin shutdown-boot). Assuming /tmp is not on / I would run cp -p /etc/resolv.conf /etc/resolv.conf.[KS]<n> where [KS] is K for the shutdown levels and S for the startup levels and <n> is the level.
 
  


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
Keep losing my /etc/resolv.conf configuration at reboot Thaidog Linux - General 3 01-28-2011 05:14 AM
resolv.conf gets rewritten on reboot even if I chmod 444 noalternative Linux - Networking 11 12-03-2009 02:09 AM
search path in resolv.conf overwritten by the hostname after reboot powah Linux - Networking 3 03-20-2009 02:13 PM
resolv.conf removed on reboot Greek Acrobat Slackware 12 07-27-2005 09:37 AM
/etc/resolv.conf resets after every reboot in FC3 RAMMS+EIN Linux - Hardware 2 05-19-2005 11:00 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 08:45 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