LinuxQuestions.org
Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
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, 09:20 AM   #1
sluge
Member
 
Registered: Dec 2006
Location: Russia,52
Posts: 116

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, 09:42 AM   #2
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
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 09:44 AM.
 
Old 03-12-2012, 02:49 AM   #3
sluge
Member
 
Registered: Dec 2006
Location: Russia,52
Posts: 116

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, 04:00 AM   #4
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,576
Blog Entries: 31

Rep: Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195Reputation: 1195
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


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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

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

All times are GMT -5. The time now is 08:39 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration