# Domainname is not getting set on boot

## milokp

My domain name is not getting set on boot.

I come from a slackware background, but I just installed gentoo for the first time last week monday, and I have most things working this week monday. I love what I have seen of gentoo, and I have to assume this is just a user mistake. gentoo is so completely different from my past Linux experence, and small foray into BSD

The computer is a Dell [gx110], P3 931 MHz, 512 ram, plen-t-o-HD space. I am running this box at work for a school as a workstation for myself [a senior tech] and as a test bed for our Linux servers.

This server is also running eth0 with ip .75 and eth0:0 with ip .169 and lo with ip 127.0.0.1

In /etc:

bash$ cat /etc/hostname

fingerferrit

bash$ cat /etc/dnsdomainname

dyndns.org

bash$ cat /etc/hosts

127.0.0.1  localhost milokp fingerferrit milokp.dyndns.org fingerferrit.dyndns.org

#IP taken out for security and all that

198.*.*.*   localhost milokp fingerferrit milokp.dyndns.org fingerferrit.dyndns.org

bash$ hostname

fingerferrit

bash$ dnsdomainname

[no output, it just gives me another bash prompt]

bash$ dnsdomainname --fqdn

localhost

I have apache2 running on the computer, but I had to add a ServerName directive to get rid of the 

"

Could not determine the server's fully qualified domain name, using 127.0.0.1 for ServerName

"

errors.

I need to get postfix working as soon as possable [this being the tech dept mail server], but that is for later. 

And currently pine is telling me :

[Incomplete maildomain "localhost".]

[Return address in mail you send may be incorrect.]

Any help at all would be... well, just that, a big help.

--Miles P

----------

## gwlinden

Did you:

```
# rc-update add domainname default
```

when following the install guide?

----------

## milokp

yeah, . Just to be sure I checked again (bash# rc-status -a says it is in default and is started). And I have tryed running /etc/init.d/domainname start with no luck.

----------

## justanothergentoofanatic

The first name after the IP address is taken to be the "official" fully qualified domainname for that IP. Also, it really doesn't make sense to list the same domainname for two IPs.

So, your /etc/hosts should look like this:

127.0.0.1 localhost

198.*.*.* fingerferrit.dyndns.org fingerferrit milokp.dyndns.org milokp

This way, fingerferrit.dyndns.org will be reported as the fully qualified domainname for your server.

-Mike

----------

## TekCop

Hi,

I had exactly the same problem and solved it this way:

edit your /etc/hostname like this:

fingerferrit.dyndns.org

Hope that helps!

----------

