# domain dissapeard :O

## pluto

```

[root]-[~] # cat /etc/hostname

vmx

[root]-[~] # cat /etc/dnsdomainname

vmx.ds1.agh.edu.pl

[root]-[~] # hostname

vmx

[root]-[~] # hostname --fqdn

vmx.ds1.agh.edu.pl

[root]-[~] # dnsdomainname

ds1.agh.edu.pl

[root]-[~] # dnsdomainname --fqdn

vmx.ds1.agh.edu.pl
```

reboot, and...

```

This is vmx.(none) (Linux i686 2.4.20-gentoo-r5) 09:38:51

            ^^^^^^ none????

```

but...

```
[root]-[~] # ll /etc/runlevels/boot/*name

lrwxrwxrwx 1 root root 22 2003-07-16 17:49 /etc/runlevels/boot/domainname -> /etc/init.d/domainname

lrwxrwxrwx 1 root root 20 2003-07-15 17:05 /etc/runlevels/boot/hostname -> /etc/init.d/hostname
```

any suggestions?

----------

## Paper

Me too (and probably many others  :Wink:  ), suffered from this problem.

I think it's solved in the latest baselayout. In fact, looking at the changes in baselayout, I think you could just try to change "/o" in "/O" in your /etc/issue file ... but I could be wrong  :Smile: 

Bye,

Paper

----------

## Azarah

Yes, the new baselayout do 'fix' it, and you can just change the 'o' to an 'O',

but the real fix is util-linux-2.11z-r6, which add the 'O' support to agetty.

----------

## popS

 *Quote:*   

> root]-[~] # ll /etc/runlevels/boot/*name 
> 
> lrwxrwxrwx 1 root root 22 2003-07-16 17:49 /etc/runlevels/boot/domainname -> /etc/init.d/domainname 

 

Is /etc/init.d/domainname running?

/etc/init.d/domainname status

if not, try starting it:

/etc/init.d/domainname start

and/or add it to default runlevel:

rc-update add domainname default

Hope it helps

----------

## quantus

This is really weird.  I'm at a loss as to where the real probem is...  

Changing '\o' to '\O' did not fix the problem.  '/bin/dnsdomainname' reports 'Unknown host' even with '/etc/init.d/domainname' running and '/etc/dnsdomainname' correctly populated. dig -x aaa.bbb.ccc.ddd returns a PTR to my ipname aswell as dig xyz.qwerty.net returns my A record.

Any Ideas?

----------

## Death Valley Pete

I'm having the same problem as quantus. Since this doesn't seem to be something that too many people are having a problem with then I'm guessing it's a problem between the sceen and the keyboard.  :Sad:  Anybody know what incredibly stupid thing I'm missing? I'm a little weak on the concept anyway I think...

----------

## snowzach

Hmmm.. I am really unfamiliar with Gentoo at this point but I started looking into this problem.. I don't think it has anything to do with the issue file... I think it more has to do with the domain name of the machine actually not being set...

The first thing I noticed on mine was that the /etc/init.d/domainname script was not being run in the boot runlevel. 

I issued the command

/sbin/rc-update add domainname boot

So now it sets the domainname when it boots. 

(Make sure you have the file /etc/dnsdomainname with your domain in it)

the next problem I noticed is that the domainname script doesn't actually call /bin/domainname to set the domain name of the machine. I modified /etc/init.d/domainname and added the following line (in green)

ebegin "Setting DNS domainname to ${mydnsdomain}"

-> /bin/domainname $mydnsdomainname

 gawk -v DOMAIN="${mydnsdomain}" \

   'BEGIN { print "domain " DOMAIN }

   $0 !~ /^[[:space:]]*domain/ { print }' \

   /etc/resolv.conf > /etc/resolv.conf.new 

That seemed to fix the problem...

It might not be the correct way but it seems to work...

----------

## Death Valley Pete

Snowzach: good thought (and it did get the output of domainname to display correctly) but I ought to be clear on what my problem is.

My network DHCP/DNS server is a dial-up gateway running Windows xp.   :Embarassed:  For the moment let's say that this is beyond my control. The problem here is that I can't get my Gentoo machines to register their names on the network. So even though I can get it to register on my Linux box that 'this is gentoo.mshome.net', I can't get it to resolve on central.mshome.net (the xp gateway). But I can get an ip address from the xp box via dhcp, and pinging central.mshome.net from my Linux box does work. I spent some time on this a few months ago, and decided that it was probably some problem between Linux and Windows. I considered installing BIND on my xp box, but I didn't know for sure that this would fix it and honestly I think it's over my head. 

But... I was performing a gentoo install from Knoppix yesterday, and I discovered that somehow, Knoppix does resolve names to the xp box. (i.e. I can ping Knoppix.mshome.net) So now I'm quite a bit confused and a little irritated. I've gotten it to display the right name on bootup, but I don't think I'm making any headway here.

After spending yesterday afternoon searching the forums and not finding anything that fixed it, I'm guessing that I'm missing something easy here. Anybody know what it is?

----------

## joehni

Hi Pete,

had the same problem. One was my own fault, since I've added my hostname and fqdn as aliases to localhost in /etc/hosts:

```
127.0.0.1 localhost myhost myhost.mydomain.local
```

which was plain wrong. There should be no aliases for localhost:

```
127.0.0.1 localhost
```

Additionally I added hostname and domainname scripts so tart at boot level:

```

rc-update add hostname boot

rc-update add domainname boot

```

and I configured my DHCP client to send my hostname to the DHCP server (done in /etc/conf.d/net):

```
dhcpcd_eth0="-h myhost"
```

Now my host is registered ...  :Very Happy: 

----------

