HOSTNAME variable

ARNAUDOV Krasimir krasimir.arnaudov at thalesgroup.com
Mon Jun 18 13:28:23 CEST 2012


Hello,
I have had the same problem.
I have modified fai-chboot so HOSTNAME is added to the pxe boot file when it's generated.

Find the row and add HOSTNAME=$host:
$append="append $initrd $bootprot $rootfs HOSTNAME=$host $opt_k $flags $action\n";

Regards
Krasimir Arnaudov

-----Original Message-----
From: linux-fai-bounces at uni-koeln.de [mailto:linux-fai-bounces at uni-koeln.de] On Behalf Of Hiro Protagonist
Sent: Montag, 18. Juni 2012 13:20
To: linux-fai at uni-koeln.de
Subject: Re: HOSTNAME variable

sorry to bother again about this issue, but now i checked that my DNS server works correclty:
i can boot into the live system and "# dig" reverse DNS queries.

but "# hostname" still returns "fai-live-host" (which is also in /etc/hostname).

"# hostname -f" fails (temporary failure in name resolution). if i log in to the live system and change the hostname to the correct hosname by hand, "# hostname -f" also works.

the ${HOSTNAME} variable is always "fai-live-host".


again my question: where is the hostname (and the HOSTNAME variable) set during the FAI boot? how can i debug what's happening there? or is there another check i could run?

any ideas?

thanks in advance!


On 06/13/2012 12:05 PM, Hiro Protagonist wrote:
> hello
>
> i seem to have some problems with my DHCP/DNS settings. when trying a 
> FAI installation, the HOSTNAME variable always resolves to 
> "fai-live-host". i tried to create a workaround that gets the hostname 
> from the ipaddress, assigns it to $HOSTNAME (and exports HOSTNAME). 
> but that does not work: FAI ends up in a shell and $HOSTNAME is still 
> "fai-live-host".
>
> where does FAI assign the HOSTNAME variable? can't i change it? or 
> what else could have gone wrong?
>
> (this is on FAI 3.4.0ubuntu2)
>
> thanks in advance!



More information about the linux-fai mailing list