Problem with /etc/hostname and /etc/hosts

Farid Behnia behnia at gmail.com
Thu Aug 23 23:49:56 CEST 2007


Hi,

I'm a newbie to FAI and am still in the process of digesting the
documentation. I've managed to install a client via PXE and I've got
reachability between the server and the client. The FAI version used is
3.1.8 under Debian etch.

The client is called demohost as in the FAI Guide and the IP assigned to is
172.16.55.130. The problem is that neither of /etc/hostname nor /etc/hosts
have the correct values.

Demohost:

/etc/hostname :
172.16.55.130

/etc/hosts:

IPs & hosts assigned to different interfaces on the FAI server
as well as this strange line:

172.16.55.130  172.16.55.130.  172.16.55.130

A search through the client's logs yields the following:

#grep -iR etc/hostname /var/log/fai/172.16.55.130/

/var/log/fai/172.16.55.130/last/shell.log:fcopy: no matching file for any
class for etc/hostname defined.

#grep -iR etc/hosts /var/log/fai/172.16.55.130/

/var/log/fai/172.16.55.130/last/shell.log:fcopy: no matching file for any
class for etc/hosts defined.
/var/log/fai/172.16.55.130/last/fai.log:ainsl: appending to
/tmp/target/etc/hosts: 172.16.55.130  172.16.55.130.  172.16.55.130

and nothing related in error.log.

On the FAI server I have:

farid at debian:/srv/fai/config$ grep -iR etc/hostname .*

./scripts/FAIBASE/10-misc:fcopy /etc/hostname || echo $HOSTNAME     >
$target/etc/hostname
../config/scripts/FAIBASE/10-misc:fcopy /etc/hostname || echo $HOSTNAME
> $target/etc/hostname

farid at debian:/srv/fai/config$ grep -iR etc/hosts .*

./files/etc/fai/make-fai-nfsroot.conf/FAISERVER:# on the clients. This
line(s) will be added to $nfsroot/etc/hosts.
./scripts/FAIBASE/10-misc:fcopy -iM /etc/hosts /etc/motd
./scripts/FAISERVER/10-conffiles:perl -e 'for (1..25) {printf
"192.168.1.%satom%02s\n",$_,$_;}' >> $target/etc/hosts
../config/files/etc/fai/make-fai-nfsroot.conf/FAISERVER:# on the clients.
This line(s) will be added to $nfsroot/etc/hosts.
../config/scripts/FAIBASE/10-misc:fcopy -iM /etc/hosts /etc/motd
../config/scripts/FAISERVER/10-conffiles:perl -e 'for (1..25) {printf "
192.168.1.%s atom%02s\n",$_,$_;}' >> $target/etc/hosts

farid at debian:/srv/fai/config$ ls -l /srv/fai/config/files/etc/hosts/
total 4
-rw-r--r-- 1 root root 671 2007-08-23 15:41 hosts

$cat /srv/fai/config/files/etc/hosts/hosts

127.0.0.1 localhost debian
172.16.55.1     master           master.mynetwork
172.16.55.130   demohost        demohost.mynetwork
#The following lines are desirable for IPv6 capable hosts
::1 ip6-localhost ip6-loopback
fe00::0 ip6-localnet
ff00::0 ip6-mcastprefix
ff02::1 ip6-allnodes
ff02::2 ip6-allrouters
ff02::3 ip6-allhosts


$less /srv/fai/config/files/etc/hostname/demohost
demohost

BTW I have read about some fai user being created on the install server but
I have none in my passwd file.

How am I supposed to feed the clients with the correct hostname and hosts?

Any help from you gurus would be appreciated!
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.uni-koeln.de/pipermail/linux-fai/attachments/20070824/fa516413/attachment.htm 


More information about the linux-fai mailing list