# Blank resolv.conf [solved]

## Trog Dog

How do you get dhcpcd to generate the correct info in /etc/resolv.conf?

Today I lost the ability to "see" a number of my boxes, on further investigation instead of being on 10.0.0.x they're requesting 169.x.x.x addresses, resolv.conf is blank apart from the three comments - on the one working box I have left the resolv.conf is correct

```
# Generated by dhcpcd from eth0

# /etc/resolv.conf.head can replace this line

domain DogPound

nameserver 10.0.0.180

# /etc/resolv.conf.tail can replace this line
```

manually adding the above to the non-working boxes doesn't work it gets overwritten blank, would appreciate any assistance.Last edited by Trog Dog on Sat Aug 13, 2011 5:45 pm; edited 1 time in total

----------

## devilheart

You can use /etc/resolv.conf.head to force some lines to appear at the beginning of the file. If dhcpcd doesn't fill resolv.conf correctly then it isn't getting the correct informations from your dhcp server. Check dhcpcd config

----------

## NeddySeagoon

Trog Dog,

If you got 169.x.x.x IP addresses, dhcpcd failed to connect the the dhcp server for some reason. As a result, it assigned the interface a link local IP.

/etc/resolv is blank as a b product.  If you have a  link local IP, you have no use for a nameserver.

----------

## Trog Dog

 *devilheart wrote:*   

> You can use /etc/resolv.conf.head to force some lines to appear at the beginning of the file. If dhcpcd doesn't fill resolv.conf correctly then it isn't getting the correct informations from your dhcp server. Check dhcpcd config

 

Thanks devilheart

Created /etc.resolv.conf.head with relevant lines which did add the relevant info to resolv.conf. Unfortunately for me this hasn't rectified the no network problem so it must be deeper than an empty resolv.conf, misdiagnosis on my part.  :Sad: 

----------

## Trog Dog

 *NeddySeagoon wrote:*   

> Trog Dog,
> 
> If you got 169.x.x.x IP addresses, dhcpcd failed to connect the the dhcp server for some reason. As a result, it assigned the interface a link local IP.
> 
> /etc/resolv is blank as a b product.  If you have a  link local IP, you have no use for a nameserver.

 

G'day Neddy

The dhcp server is a Thomson St536v6, I'll try rebooting it then restarting net.eth0 on the affected boxes, actually all the affected boxes are on one switch, think i'll test the uplink and switch first.

----------

## Trog Dog

 *Trog Dog wrote:*   

>  *NeddySeagoon wrote:*   Trog Dog,
> 
> If you got 169.x.x.x IP addresses, dhcpcd failed to connect the the dhcp server for some reason. As a result, it assigned the interface a link local IP.
> 
> /etc/resolv is blank as a b product.  If you have a  link local IP, you have no use for a nameserver. 
> ...

 

You're a legend Neddy - the switch these boxes connect to is buggered (the lights are on but no ones home) - will have to get a new one in the morning. Cheers.

----------

