hostname resolving Re: FAI and partitions

Patrick Dreker dreker at graphics.cs.uni-sb.de
Tue Nov 27 21:29:12 CET 2001


Am Die, 2001-11-27 um 20.25 schrieb Geert Stappers:
> At 19:30 +0100 11/27/01, Patrick Dreker wrote:
> >Hello...
> >I am booting a beowolf off the net using the on board PXE capable
> >Networkcards to do the setup in combination with DHCP (using ISC DHCP2).
> >The Kernel which is used to boot the nodes from the NFSroot has IP Level
> >Autoconfiguration enabled, and gets a commandline from PXElinux (a
> >syslinux derivative) which tells it all IP Parameters. These parameters
> >in turn are derived from the DHCP answer of the server, and as it turns
> >out, DHCP does NOT set the hostname on the client, and if the Kernel
> >finds no hostname it sets its hostname to the numeric IP Address it got
> >from DHCP, and this is why the FAI scripts fail in that situation.
> >
> >I fixed this problem by adding
> >option host-name "gridXX"
> >to every host declaration in the DHCPd configuration file, so

> >Note that all hosts have a valid DNS entry, otherwise the last line
> >would need to be the numeric address, instead of the hostname.

> >Maybe your setup is not the same, but then again maybe it's a related or
> >similar problem...
> 
> 
> As a "BOOTP" user I didn't encounter such problems.
We had the DHCP already there, and we knew how to use it, so well...

> Is it a DHCP / FAI combination problem?
In our case I think it was more like a DHCP/FAI/PXE combination problem.
Maybe there is a clean way to fix the problems, but I could not think of
one, and there was some timepressure...

The problem was exactly like the original poster described: The disk
geometry file could not be found, and I found out that the $HOSTNAME
Variable contained the numeric IP of the machine, instead of its real
hostname. 

As the machines got their IP Configuration from a kernel commandline,
which in turn gets made by PXElinux, which in turn is fed by the DHCP
Daemon, which does not implicitly send a hostname when none is given in
the Host section, PXElinux does not have the hostname and gives no
hostname on the commandline. The kernel, not knowing its hostname fills
in the default, namely the DHCP given IP address. At this point the
network interface eth0 is up and running with no userland started yet.
When FAI is started later on, it seems to stumble on the fact that eth0
is already configured (dhclient hangs (timeouts), when trying to bring
up the interface), and takes the hostname as given by the system, which
is the wrong one...

On the other hand: the network card has to be up at this point, or else
mounting / via NFS would be doomed to fail.

After adding the host-name option in dhcpd.conf it worked immediately.

All considered we encountered quite a few problems when setting up PXE
Booting and FAI, but none of these were so complicated that they could
not be corrected or worked around with little effort.

> Geert
Patrick.



More information about the linux-fai mailing list