You are not logged in.

#1 2015-03-02 19:03:41

lounge
Member
Registered: 2015-03-01
Posts: 23

[SOLVED] resolv.conf resets on restart

Hi,

The reason i need to edit resolv.conf is due to error...core.db...pacman even if im connected to wifi with working internet ,this is also the way i installed arch.
But every time i restart computer savings from resolv.conf are lost and i need to edit it again.Help!

Last edited by lounge (2015-03-15 17:34:35)

Offline

#2 2015-03-02 19:13:14

Raynman
Member
Registered: 2011-10-22
Posts: 1,539

Re: [SOLVED] resolv.conf resets on restart

Offline

#3 2015-03-02 21:22:44

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,771
Website

Re: [SOLVED] resolv.conf resets on restart

@OP: Edit the file at /etc/dhcpcd.conf and add this line at the bottom:

nohook resolv.conf

https://wiki.archlinux.org/index.php/Re … pcd_config

Alternatively, make the resolv.conf file immutable:

# chattr +i /etc/resolv.conf

Last edited by Head_on_a_Stick (2015-03-02 21:24:28)

Offline

#4 2015-03-02 21:26:28

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [SOLVED] resolv.conf resets on restart

^ Raynman linked to the same wiki page. I guess an echo is a good thing.

Offline

#5 2015-03-02 21:51:22

frank604
Member
From: BC, Canada
Registered: 2011-04-20
Posts: 1,212

Re: [SOLVED] resolv.conf resets on restart

Make the resolv.conf write protected.  Echo.

Offline

#6 2015-03-15 16:27:42

lounge
Member
Registered: 2015-03-01
Posts: 23

Re: [SOLVED] resolv.conf resets on restart

Head_on_a_Stick wrote:

@OP: Edit the file at /etc/dhcpcd.conf and add this line at the bottom:

nohook resolv.conf

https://wiki.archlinux.org/index.php/Re … pcd_config

Alternatively, make the resolv.conf file immutable:

# chattr +i /etc/resolv.conf

I did all this ,but still loosing ,how exactly i make resolv.conf write protected by echo ?

Offline

#7 2015-03-15 16:39:47

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,771
Website

Re: [SOLVED] resolv.conf resets on restart

What is the output of:

lsattr /etc/resolv.conf

Offline

#8 2015-03-15 16:47:56

lounge
Member
Registered: 2015-03-01
Posts: 23

Re: [SOLVED] resolv.conf resets on restart

Head_on_a_Stick wrote:

What is the output of:

lsattr /etc/resolv.conf

Hi,this is the output

-------------e-- /etc/resolv.conf

Offline

#9 2015-03-15 17:06:13

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,771
Website

Re: [SOLVED] resolv.conf resets on restart

lounge wrote:

Hi,this is the output

-------------e-- /etc/resolv.conf

The immutable bit is not set; try again:

# chattr +i /etc/resolv.conf

It should then look like this:

empty@Arch ~ % lsattr /etc/resolv.conf
----i--------e-- /etc/resolv.conf

Offline

#10 2015-03-15 17:30:11

lounge
Member
Registered: 2015-03-01
Posts: 23

Re: [SOLVED] resolv.conf resets on restart

Head_on_a_Stick wrote:
lounge wrote:

Hi,this is the output

-------------e-- /etc/resolv.conf

The immutable bit is not set; try again:

# chattr +i /etc/resolv.conf

It should then look like this:

empty@Arch ~ % lsattr /etc/resolv.conf
----i--------e-- /etc/resolv.conf

It is working now ,thank you :>

Offline

#11 2015-03-15 17:31:51

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,771
Website

Re: [SOLVED] resolv.conf resets on restart

You're welcome.

If you edit the title of this thread and put "[SOLVED]" at the beginning, it will help others with this problem wink

Offline

Board footer

Powered by FluxBB