| Author |
Message |
Crisis
Joined: 14 Jan 2004
Posts: 40
|
| Posted: Wed Jan 14, 2004 8:58 am Post subject: Gentoo not having a domainname |
|
|
Well got my Linode all setup in gentoo, only problem is my domainname isn't showing up, which I think is causing problems with qmail.
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? |
|
| Back to top |
|
Crisis
Joined: 14 Jan 2004
Posts: 40
|
| Posted: Wed Jan 14, 2004 9:14 am Post subject: |
|
|
| 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? |
|
| Back to top |
|
bji
Joined: 27 Aug 2003
Posts: 182
|
| Posted: Wed Jan 14, 2004 12:25 pm Post subject: |
|
|
Crisis wrote: 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 ... |
|
| Back to top |
|
caker
Joined: 15 Apr 2003
Posts: 2392
Location: Galloway, NJ
|
| Posted: Wed Jan 14, 2004 4:49 pm Post subject: |
|
|
Sounds like you're doing it right ...
http://www.gentoo.org/doc/en/gentoo-x86-install.xml#doc_chap19
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 |
|
| Back to top |
|
pclissold
Joined: 24 Oct 2003
Posts: 472
Location: Netherlands
|
| Posted: Thu Jan 15, 2004 8:47 am Post subject: Domain Name for Gentoo |
|
|
I assume you are getting li-200.members.linode.com as your domain name (and not some other, completely incorrect name) instead of garzsbarg.com, in which case you need to turn off DHCP to activate the settings in your /etc/hostname and /etc/dnsdomainname files.
For Gentoo you need to edit /etc/conf.d/net as follows:
1) comment out the line Code: iface_eth0="dhcp"
2) add a line to statically configure the ethernet interface: Code: 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 Code: 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. |
|
| Back to top |
|
Crisis
Joined: 14 Jan 2004
Posts: 40
|
| Posted: Thu Jan 15, 2004 11:06 am Post subject: |
|
|
Thanks guys, I changed it to static and edited resolv.conf, but it is still being changed at boot, now a bit differently:
Code:
/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. |
|
| Back to top |
|
adamgent
Joined: 23 Jun 2003
Posts: 261
|
| Posted: Thu Jan 15, 2004 11:27 am Post subject: |
|
|
Hi,
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 |
|
| Back to top |
|
Crisis
Joined: 14 Jan 2004
Posts: 40
|
| Posted: Thu Jan 15, 2004 11:41 am Post subject: |
|
|
| Adam, those commands do show the correct output, interesting. I wonder why I do not have these symptoms on my other gentoo boxen. |
|
| Back to top |
|
pclissold
Joined: 24 Oct 2003
Posts: 472
Location: Netherlands
|
| Posted: Thu Jan 15, 2004 11:45 am Post subject: |
|
|
The command domainname with no options shows the nis/yp domain name.
-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? |
|
| Back to top |
|
| |