User avatar
Eliza86
Posts: 4
Joined: Thu Oct 16, 2014 7:44 am
Location: Australia

/etc/resolv.conf WILL NOT SAVE?

Thu Oct 16, 2014 7:57 am

If anyone has any information on this, I would greatly appreciate it.

I'm located in Australia and I'm trying to use unblock-us to view Netflix. When I put the DNS settings in via sudo nano /etc/resolv.conf it will not save.

Initially it looks like its saved, but after the first reboot its back to the original settings.
PLEASE HELP! I've been wracking my brain over this for day.

Is there some other way I should be saving the DNS settings?
Is there some update I need to fix this issue?

Any help would be so greatly appreciated :)

drgeoff
Posts: 10962
Joined: Wed Jan 25, 2012 6:39 pm

Re: /etc/resolv.conf WILL NOT SAVE?

Thu Oct 16, 2014 11:23 am

I guess you are using DHCP on the RPi to get its IP address from the router. If so, you don't realise that it also gets its DNS server from there too.

Change your RPi to use manually assigned settings.
Quis custodiet ipsos custodes?

ne3e
Posts: 10
Joined: Fri Apr 20, 2012 2:09 pm

Re: /etc/resolv.conf WILL NOT SAVE?

Thu Oct 16, 2014 1:03 pm

You need to have root privileges to change system files.
Use sudo {command} to change the file!



Good Luck

John
NE3E

User avatar
PeterO
Posts: 5958
Joined: Sun Jul 22, 2012 4:14 pm

Re: /etc/resolv.conf WILL NOT SAVE?

Thu Oct 16, 2014 1:33 pm

ne3e wrote:You need to have root privileges to change system files.
Use sudo {command} to change the file!
Good Luck
John
NE3E
This is NOT a permissions issue and you clearly havn't actually read the initial question propperly....
PeterO
Discoverer of the PI2 XENON DEATH FLASH!
Interests: C,Python,PIC,Electronics,Ham Radio (G0DZB),1960s British Computers.
"The primary requirement (as we've always seen in your examples) is that the code is readable. " Dougie Lawson

User avatar
DougieLawson
Posts: 39626
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: /etc/resolv.conf WILL NOT SAVE?

Thu Oct 16, 2014 4:58 pm

Install the resolvconf package then you can add the DNS definitions to /etc/network/interfaces.

When an interface comes up the /etc/network/if-up.d script for resolvconf runs and updates /etc/resolv.conf with the stuff you've defined in the interfaces file.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All fake doctors are on my foes list.

User avatar
Eliza86
Posts: 4
Joined: Thu Oct 16, 2014 7:44 am
Location: Australia

Re: /etc/resolv.conf WILL NOT SAVE?

Fri Oct 17, 2014 5:36 am

drgeoff wrote:I guess you are using DHCP on the RPi to get its IP address from the router. If so, you don't realise that it also gets its DNS server from there too.

Change your RPi to use manually assigned settings.
thank you for taking the time to respond to my post. How do I change the RPi to use manually assigned settings? my apologies for the noob question...but I am just that.. I noob lol.

User avatar
Eliza86
Posts: 4
Joined: Thu Oct 16, 2014 7:44 am
Location: Australia

Re: /etc/resolv.conf WILL NOT SAVE?

Fri Oct 17, 2014 5:41 am

DougieLawson wrote:Install the resolvconf package then you can add the DNS definitions to /etc/network/interfaces.

When an interface comes up the /etc/network/if-up.d script for resolvconf runs and updates /etc/resolv.conf with the stuff you've defined in the interfaces file.
Thanks for the help. Installed resolfconf and when i add the DNS settings to /etc/network/interfaces, it saves them but still wont pick up the dns settings. Also when checking /etc/resolv.conf just to see if there was anything in there of use, it says not to manually adjust anything in there in capitals lol. My apologies, Im a noob. please be patient with me.

Once the resolvconfi pack was installed, nothing seemed to change only the capital letters telling me not to manually adjust /etc/resolv.conf

Is there something else I may need? Sorry to be a noobie pain, though i'm doing pretty well considering lol

User avatar
Eliza86
Posts: 4
Joined: Thu Oct 16, 2014 7:44 am
Location: Australia

Re: /etc/resolv.conf WILL NOT SAVE?

Fri Oct 17, 2014 5:43 am

ne3e wrote:You need to have root privileges to change system files.
Use sudo {command} to change the file!



Good Luck

John
NE3E
Thanks John, but yes I have been using sudo nano to edit the file. Thanks for the response anyway :)

drgeoff
Posts: 10962
Joined: Wed Jan 25, 2012 6:39 pm

Re: /etc/resolv.conf WILL NOT SAVE?

Fri Oct 17, 2014 9:59 am

Eliza86 wrote:
drgeoff wrote:I guess you are using DHCP on the RPi to get its IP address from the router. If so, you don't realise that it also gets its DNS server from there too.

Change your RPi to use manually assigned settings.
thank you for taking the time to respond to my post. How do I change the RPi to use manually assigned settings? my apologies for the noob question...but I am just that.. I noob lol.
An internet search using the terms 'raspberry pi static ip address' will yield many sources of instructions. However they do not all include the extra step of setting the DNS server address(es). Suggest you try http://www.suntimebox.com/raspberry-pi- ... k-3/day-5/
Quis custodiet ipsos custodes?

Return to “Troubleshooting”