Getting hostnames from PXE to build

Thomas Lange lange at informatik.Uni-Koeln.DE
Thu Mar 2 15:46:31 CET 2006


>>>>> On Sun, 26 Feb 2006 21:26:02 +1100, Darryl Luff <darryl at snakegully.nu> said:

    > label jack
    > kernel fai/vmlinuz-install
    > append ... hostname=jack
To set the hostname you can use the kernel append parameter ip=. From
the nfsroot.txt from the kernel sources:

ip=<client-ip>:<server-ip>:<gw-ip>:<netmask>:<hostname>:<device>:<autoconf>

  <hostname>    Name of the client. If empty, the client IP address is
                used in ASCII notation, or the value received by BOOTP.


    > I add 'hostname=jack' to the kernel command line so I can use the
    > hostname as a key to select the FAI classes. To make it work like this,
    > I had to add a few lines to fai/nfsroot/usr/sbin/fai to pickup the
    > hostname from /proc/cmdline and export it to $HOSTNAME.
And also call the command hostname with this "new" hostname.

> Is there a more standard 'fai' way to do this, that doesn't involve
> modifying 'fai' itself in any way? The hostname has to be set before the
See above. You can also add HOST=jack on the command line. Then, the script fai
will set this hostname.

-- 
regards Thomas



More information about the linux-fai mailing list