Getting hostnames from PXE to build

Juraj Holtak juraj at proaut.org
Sun Feb 26 15:05:32 CET 2006


hi

we do it here via dhcp. we have an "reservation" for each maschine and
set the hostname there. our hostnames follow special syntax, so we can
use different classes for things that can`t be decided by the machine
itself.

we had to limit the length of our hostnames to max 14 character because
we triggered buffer overflows in winbindd.

a-t3-l-v-c-083 is an example hostname

we use - as delimiter between fields

first field is the maschine type 

second is display type (CRT,TFT) and the resolution  3 is 1280x1024 so
we can setup perfect X with perfect sync rates

third identifies if the maschine runs linux only, windows only (so if
somebody accidentally fires up PXE boot the maschine doesn`t get wiped)
or both (leave first partition as it is and add a windows section to
grub)

the fourth is the location of the machine (we have machines in more
distinct buildings)

fifth is what we use this machine for, or better, what software do we
install

the number is the ip address encoded in hex (the first hex-digit is the
network)

we started with this almost 2 years ago and if I could start over I
would change some thing (the HW info ins`t needed anymore as discover
and hotplug went mature) we have little trouble with local printers and
scanners, because they need manual config after install. we didn`t think
about`em.

the big advantage is, that the normal network admin who administers the
exchange servers, can hang in and install a linux machine, because all
what he has to do is to create a reservation for it.

feel free to ask if you want more information.

regards,
Juraj Holtak

On Sun, 2006-02-26 at 21:26 +1100, Darryl Luff wrote:
> Hi all. I'm new to FAI. I've seen a few requests in the archives about
> setting the hostname on the built machine using other than the DHCP
> config, but none really did what I need to do.
> 
> I boot via PXE and type the hostname I want to build at the pxelinux
> prompt. Some hosts are redhat, others are windows, others (will be) fai.
> The pxelinux config runs the appropriate installer for that specific
> host. For the fai hosts I have (in pxelinux.cfg/default):
> 
> label jack
> kernel fai/vmlinuz-install
> append ... hostname=jack
> 
> So 'jack' is a debian host to be built using FAI. So I only need to type
> the hostname at the pxelinux prompt and the rest of the build is hands off.
> 
> 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.
> 
> 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
> fai classes are selected.
> 
> 
> Thanks.
> 



More information about the linux-fai mailing list