Author Topic: /etc/resolv.conf empty after every reboot  (Read 913 times)

Offline racuna

  • Full Member
  • ***
  • Posts: 75
/etc/resolv.conf empty after every reboot
« on: August 10, 2012, 08:05:23 AM »
I use my laptop in my home and my office, but every boot the resolv.conf file is empty. I have to copy a backup of my resolv.conf.work or resolv.conf.home to /etc/ dir after every reboot and its very annoying.

I have this problem since this wednesday, and i cant find a solution. Today i'll going to my parents place, and I don't have a resolv.conf.parents backup :P

So, any ideas?

Offline pags

  • Hero Member
  • *****
  • Posts: 2519
  • Keep it clean.
Re: /etc/resolv.conf empty after every reboot
« Reply #1 on: August 10, 2012, 11:30:55 AM »
Check your network settings (PCC > Network & Internet > Network Center > ) and expand the appropriate device (wired, wireless, etc.).  Click "Configure" and check if "Get DNS servers from DHCP" is checked off.  If it isn't, and the values are blank, then you may end up with an empty resolv.conf.

Offline racuna

  • Full Member
  • ***
  • Posts: 75
Re: /etc/resolv.conf empty after every reboot
« Reply #2 on: August 10, 2012, 02:28:13 PM »
That option is correctly checked. :/

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5337
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: /etc/resolv.conf empty after every reboot
« Reply #3 on: August 10, 2012, 02:49:08 PM »
The resolv.conf file is a dynamically created by the resolvconf program.  Making changes to the resolv.conf file will just end up being overwritten.  If you want to add your stuff you can do it by adding it to the tail file at /etc/resolvconf/resolv.conf.d

so open your favorite editor as the root user and make you changes at

/etc/resolvconf/resolv.conf.d/tail

Mine has the following in the tail file

[root@workbox dwmoar]# cd /etc/resolvconf/resolv.conf.d
[root@workbox resolv.conf.d]#pico tail


nameserver 208.67.222.222
nameserver 208.67.220.220


Give that a try and see if it doesn't fix things up for you.





Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline racuna

  • Full Member
  • ***
  • Posts: 75
Re: /etc/resolv.conf empty after every reboot
« Reply #4 on: August 13, 2012, 08:03:59 PM »
It works.. kind of. I still need to run dhclient as root to make it work fine.

Another question: Can i put every nameserver (work & home) in that "tail" file?

Offline YouCanToo

  • PCLinuxOS Tester
  • Hero Member
  • *******
  • Posts: 5337
  • Location: Lebanon, OR., USA
    • Spreading the word.......
Re: /etc/resolv.conf empty after every reboot
« Reply #5 on: August 13, 2012, 09:19:47 PM »
It works.. kind of. I still need to run dhclient as root to make it work fine.

You could add the command to the bottom of your /etc/rc.local file

Quote
Another question: Can i put every nameserver (work & home) in that "tail" file?

short answer yes!

« Last Edit: August 13, 2012, 09:21:33 PM by YouCanToo »




Be sure to visit the NEW Knowledge Base


Linux is user-friendly- it's just picky who its friends are!

Offline racuna

  • Full Member
  • ***
  • Posts: 75
Re: /etc/resolv.conf empty after every reboot
« Reply #6 on: August 15, 2012, 01:46:20 PM »
It works.. kind of. I still need to run dhclient as root to make it work fine.

You could add the command to the bottom of your /etc/rc.local file

Doesn work, i still run dhclient as root

Quote
Another question: Can i put every nameserver (work & home) in that "tail" file?

short answer yes!



Thanks, i put every nameserver and i just need to solve the dhclient issue