bharadwajtk
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

Hi,
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 8.8.8.8." is working on my Pi, I am unable to ping google.com or ping -c3 google.com. I checked the /etc/resolv.conf file but it has this entry "# Generated by resolvconf".

Then I added nameserver 8.8.8.8 to the resolv.conf file and after that ping google.com 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
rpdom
Posts: 12887
Joined: Sun May 06, 2012 5:17 am
Location: Ankh-Morpork

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 8.8.8.8" to the interface definition, restart, and that entry should be added to the autogenerated file.

Return to “Troubleshooting”