View previous topic :: View next topic |
Author |
Message |
Fissile Guru
Joined: 23 Nov 2003 Posts: 470
|
Posted: Fri Dec 28, 2007 10:23 pm Post subject: Problem with /etc/resolv.conf |
|
|
Hi guys, just got gentoo up and running and everything is perfect for the most part. I am running into a slight problem with getting the internet working every time I reboot. It would seem my /etc/resolv.conf file only contain one uncommented line that is: Code: | domain <mydomainname> | and that is it. Everytime I reboot i have to Code: | echo nameserver 192.168.0.1 >> /etc/resolv.conf (x 2) |
Is there any way to make this change permanent?
Thank you.
Muq _________________ The Only Thing Necessary for The Triumph of evil is for Good Men To do Nothing!... |
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
|
Back to top |
|
|
Fissile Guru
Joined: 23 Nov 2003 Posts: 470
|
Posted: Fri Dec 28, 2007 11:02 pm Post subject: |
|
|
HI,
Alright so my conf.d/net is:
Code: | dns_domain_lo="universe"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"
|
so i should do what exactly? I am kind of new at this. _________________ The Only Thing Necessary for The Triumph of evil is for Good Men To do Nothing!... |
|
Back to top |
|
|
truc Advocate
Joined: 25 Jul 2005 Posts: 3199
|
Posted: Fri Dec 28, 2007 11:14 pm Post subject: |
|
|
Fissile wrote: | HI,
Alright so my conf.d/net is:
Code: | dns_domain_lo="universe"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"
|
so i should do what exactly? I am kind of new at this. |
I'd say, try this first, you probably don't need the other lines if you "borrowed" them from someone else
Code: | #dns_domain_lo="universe"
config_eth0=( "dhcp" )
#dhcp_eth0="nodns nontp nonis"
|
_________________ The End of the Internet! |
|
Back to top |
|
|
Fissile Guru
Joined: 23 Nov 2003 Posts: 470
|
Posted: Sat Dec 29, 2007 12:16 am Post subject: |
|
|
Humm, I am sorry. Now i am confused. That is what I have Code: | dns_domain_lo="universe"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis" |
I guess all i need to know is how do I prevent my /etc/resolv.conf from being reseted to just "domain universe" and not have to manually add "nameserver 192.168.0.1" everytime I reboot. _________________ The Only Thing Necessary for The Triumph of evil is for Good Men To do Nothing!... |
|
Back to top |
|
|
MostAwesomeDude Guru
Joined: 12 Aug 2007 Posts: 373
|
Posted: Sat Dec 29, 2007 1:43 am Post subject: |
|
|
Fissile wrote: | Humm, I am sorry. Now i am confused. That is what I have Code: | dns_domain_lo="universe"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis" |
I guess all i need to know is how do I prevent my /etc/resolv.conf from being reseted to just "domain universe" and not have to manually add "nameserver 192.168.0.1" everytime I reboot. |
Comment out the domain and dhcp options:
Code: | # dns_domain_lo="universe"
config_eth0=( "dhcp" )
# dhcp_eth0="nodns nontp nonis" |
The domain option is screwing up your /etc/resolv.conf, and the dhcp custom options are keeping it from regenerating correctly. |
|
Back to top |
|
|
Apopatos Guru
Joined: 17 Oct 2004 Posts: 512 Location: Hellas
|
Posted: Sat Jan 12, 2008 5:44 pm Post subject: |
|
|
I have the same problem but my conf.d/net file says:
Code: | dns_domain_lo="gentoo"
config_eth0=( "10.0.0.139 netmask 255.255.255.0" )
routes_eth0=( "default via 10.0.0.138" ) |
is it something wrong with it and it changes my resolv.conf every time I boot? |
|
Back to top |
|
|
crauley n00b
Joined: 13 Jan 2008 Posts: 1
|
Posted: Sun Jan 13, 2008 9:41 am Post subject: |
|
|
Fissile wrote: | HI,
Alright so my conf.d/net is:
Code: | dns_domain_lo="universe"
config_eth0=( "dhcp" )
dhcp_eth0="nodns nontp nonis"
|
so i should do what exactly? I am kind of new at this. |
Try adding this to conf.d/net:
From the man page:
Code: |
-R Prevents dhcpcd from replacing /etc/resolv.conf or using resolv-
conf.
|
|
|
Back to top |
|
|
UberLord Retired Dev
Joined: 18 Sep 2003 Posts: 6835 Location: Blighty
|
Posted: Mon Jan 14, 2008 11:15 am Post subject: |
|
|
Maybe someone could donate better documentation
But if you specify dns_domain then it will overwrite /etc/resolv.conf with the options you have specified.
So if you only specify dns_domain_lo="foo" and restart the lo interface it will put "domain foo" in /etc/resolv.conf and remove everything else.
Let me put it another way - you probably don't need to specify a domain there. Ask yourself why you need it and what it's for. _________________ Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool |
|
Back to top |
|
|
sing_ecgroup n00b
Joined: 09 Aug 2007 Posts: 22
|
Posted: Mon Jan 14, 2008 2:55 pm Post subject: |
|
|
Have you tried to add these 2 lines to conf.d/net
dns_servers_ESSID=( "192.168.0.1" "192.168.0.2" )
dns_domain_ESSID="some.domain" |
|
Back to top |
|
|
|