[SOLUTION] Re: Getting hostnames from PXE to build

Darryl Luff darryl at snakegully.nu
Mon Feb 27 11:39:03 CET 2006


Andreas Schockenhoff wrote:

>On Sunday 26 February 2006 11:26, Darryl Luff wrote:
>  
>
>>...
>>label jack
>>kernel fai/vmlinuz-install
>>append ... hostname=jack
>>    
>>
>Try: append .... HOST=demohost
>
>  
>
Well, I learn something new every day. I never knew that kernel command
line parameters end up in the environment. And because 'fai' already
looks for an environment variable called 'HOST', this worked. So my
pxelinux config becomes:

label jack
kernel fai/vmlinuz/install
append ... HOST=jack

And fai then picks up the $HOST environment variable, and uses it to set
HOSTNAME. So, no changes to fai needed. Thanks Andreas.

So Henning, it is 'fully automatic' after all! Just type the hostname at
the pxelinux prompt and go for a [insert appropriate beverage].

Juraj, I couldn't use reservations as I need to build various physical
machines as the same target machine at different times. My test machine
(actually a vmware machine) gets rebuilt as multiple machines in a day.
But your idea with fields in hostnames is handy sometimes. I've used a
similar scheme with redhat kickstart builds to allow a modular kickstart
file.


Thanks all. fai is certainly a pleasure after a night fiddling with the
debian-installer and preseeding!



More information about the linux-fai mailing list