Posts: 65
Joined: Sun May 26, 2013 10:22 am

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

Wed Jun 03, 2015 10:49 pm

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

User avatar
Posts: 22400
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

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

Thu Jun 04, 2015 5:02 am

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.

Return to “Troubleshooting”