Gentoo not having a domainname
I echoed into hostname and dnsdomainname, added domainname to rc level default (and tried boot), and here is my resolv.conf file:
domain garzsbarg.com
nameserver 12.96.160.115
nameserver 216.156.129.66
nameserver 216.234.234.30
search members.linode.com
I also have entries for in etc/hosts, any ideas?
8 Replies
@Crisis:
Actually I just noticed whenever I reboot, the top line of resolv.conf is removed, whichs lists domain garzsbarg.com, could that be the problem?
It sounds like your linode is using DHCP to get its IP address. The DHCP client typically rewrites /etc/resolv.conf with the DNS servers that it is told to use by the DHCP server. I'm not familiar with Gentoo and so I don't know exactly how to switch from using DHCP to a statically defined IP address, but that is what I think you need to do.
Also, I think that instad of "domain xxx.com" you want "search xxx.com". The domain name that your system knows itself by does not come from /etc/resolv.conf; on RedHat it comes from an /etc/sysconfig/network (HOSTNAME=xxx.com). The /etc/resolve.conf entry from your domain name ("search xxx.com") just tells your system that when you enter an unqualified hostname (foo) that it should first search for the name in that domain, i.e. foo.xxx.com …
I've heard reports that our Gentoo image's DHCP client doesn't re-write /etc/resolv.conf on reboots. Sounds like it actually is. I'll have to test it.
If Gentoo uses dhclient, look for a dhclient.conf file (in /etc perhaps). The config allows you to prepend stuff to the resolv.conf file…
-Chris
For Gentoo you need to edit /etc/conf.d/net as follows:
1) comment out the line````
iface_eth0="dhcp"
2) add a line to statically configure the ethernet interface:````
iface_eth0="xx.xx.xx.xx netmask 255.255.255.0"
where xx.xx.xx.xx is your Linode's IP address (64.5.53.200)
3) add a line to set the default gateway
gateway="eth0/yy.yy.yy.yy"
where yy.yy.yy.yy is the gateway specified on the network information page linked from your Linode members page.
/etc/resolv.conf
domain garzsbarg.com
search linode.com
nameserver 216.156.129.66
nameserver 216.156.129.65
but when I use the command: domainname, I get:
(none)
On a side note, I do seem to have the web and e-mail up and working so I am not sure if this is affecting anything.
On a gentoo related note, I do have 3 other stnadalone gentoo boxes, so this is more of a figre it out on the linode type question as opposed to figuring out gentoo.
What output do you get for
domainname -d
and
domainname -f
When I enter domainname on my gentoo box it comes back with none, even when things are set-up correctly but the two commands above come back with the correct data.
Adam
-d requests the domain DNS name
-f requests the FQDN
The command dnsdomainname gives the DNS name when used without options.
Do you have nis/yp set up on your other boxes?