# Gentoo ignoring /etc/resolv.conf.head

## Simba7

I'm rebuilding the lab's router and for some reason Gentoo is ignoring /etc/resolv.conf.head. I entered the correct nameservers into it and it just ignores it.

Anyone know why?

----------

## mikegpitt

Are you using a dynamic or static ip for the server?  /etc/resolv.conf is generated when the server gets an IP with dhcp.

----------

## Simba7

 *mikegpitt wrote:*   

> Are you using a dynamic or static ip for the server?  /etc/resolv.conf is generated when the server gets an IP with dhcp.

 

Static. I've got it setup like the old system, but for some reason it's wiping out resolv.conf and replacing it with our domain and completely ignoring resolv.conf.head.

----------

## mikegpitt

 *Simba7 wrote:*   

> Static. I've got it setup like the old system, but for some reason it's wiping out resolv.conf and replacing it with our domain and completely ignoring resolv.conf.head.

 Can you post your /etc/conf.d/net?  Something else must be causing /etc/resolv.conf to be overwritten on boot.  If you have a static IP, all you should need to do is edit the /etc/resolv.conf itself, and leave it alone, since it won't automatically update.

Also, check to make sure there isn't anything suspect in your /etc/conf.d/local.start (/etc/local.d/* for baselayout-2), that might be wiping out the file.

----------

## Simba7

 *mikegpitt wrote:*   

> Also, check to make sure there isn't anything suspect in your /etc/conf.d/local.start (/etc/local.d/* for baselayout-2), that might be wiping out the file.

 

Nothing in /etc/local.d/ except a README. Here's my /etc/conf.d/net config:

```
labrouter etc # cat /etc/conf.d/net

# This blank configuration will automatically use DHCP for any net.*

# scripts in /etc/init.d.  To create a more complete configuration,

# please review /usr/share/doc/openrc/net.example and save your configuration

# in /etc/conf.d/net (this file :]!).

dns_domain_lo="coblab.lan"

nis_domain_lo="coblab.lan"

# 3com 3c905 10/100mbps PCI Adapter #1

config_eth0=( "192.xxx.xxx.254 netmask 255.255.255.0 brd 192.xxx.xxx.255" )

# 3com 3c905 10/100mbps PCI Adapter #2

config_eth1=( "10.xxx.xxx.2 netmask 255.255.255.0 brd 10.xxx.xxx.255" )

routes_eth1=( "default gw 10.xxx.xxx.1" )

# 3com 3c515 10/100mbps ISA Adapter

config_eth2=( "null" )
```

----------

## Trog Dog

 *Simba7 wrote:*   

> 
> 
> ```
> 
> # 3com 3c905 10/100mbps PCI Adapter #1
> ...

 

if you're using baselayout 2 this is wrong style of command - should be 

```
config_eth0="192.xxx.xxx.254 netmask 255.255.255.0 brd 192.xxx.xxx.255"
```

you need to lose the brackets and spaces

----------

