Page 1 of 1

/etc/resolv.conf getting reset to "# Generated by resolvconf

Posted: Wed Jun 03, 2015 10:49 pm
by bharadwajtk
I am connected to my Pi (having static IP ) through my Laptop running win7 and has enabled internet connection sharing (ICS) to provide internet to Pi. While "ping" is working on my Pi, I am unable to ping or ping -c3 I checked the /etc/resolv.conf file but it has this entry "# Generated by resolvconf".

Then I added nameserver to the resolv.conf file and after that ping started working. But, when I reboot my system it's back to the same state. What to do?

Also, after reading few articles on internet I just removed resolvconf and surprisingly the issue got fixed? This issue I am facing with Raspberry Pi 2 and latest Raspbian OS. Previously it has all worked well this way

Re: /etc/resolv.conf getting reset to "# Generated by resolv

Posted: Thu Jun 04, 2015 5:02 am
by rpdom
Is your static IP defined in /etc/network/interfaces?

If so, just add the line "dns-nameservers" to the interface definition, restart, and that entry should be added to the autogenerated file.