Machine keep unassigned-hostname as hostname after installation

Hello,

I'm doing an installation of an ubuntu 12.04 and I'm using the three
templates: PXELinux Template, finish Template and provision Template.

The problem I have is that the machine is running the finish.sh script
with the hostname that is still set to unassigned-hostname. So a machine
called unassigned-hostname appears in the list of the hosts with of
course the same IP and the same MAC address.

The only error that I have is that the execution of the last command in
the preseed file

d-i preseed/late_command string http_proxy= wget
http://foreman.ecfrec.xlcloud.org/unattended/finish -O
/target/tmp/finish.sh && in-target chmod +x /tmp/finish.sh && in-target
/tmp/finish.sh

returns an error 8. I can see in the log that the file
/target/tmp/finish.sh is downloaded and executed. I don't see any other
errors, The last message in the log is "puppet-agent[28111]: Finished
catalog run in 0.06 seconds"

So I understand that the hostname is set in the PXELinux Template as
unassigned-hostname but I don't see when it must be replaced that the real
hostname. I created the new host with the name foremanvm1.localdomain.

Regards,
Guillaume

Try using this PXELinux template (remember to toggle the Build button to
write the file to your TFTP proxy):
https://github.com/theforeman/community-templates/blob/master/debian/squeeze/PXELinux.erb

Greg

··· On 26 April 2013 08:39, Guillaume Thouvenin wrote:

Hello,

I’m doing an installation of an ubuntu 12.04 and I’m using the three
templates: PXELinux Template, finish Template and provision Template.

The problem I have is that the machine is running the finish.sh script
with the hostname that is still set to unassigned-hostname. So a
machine called unassigned-hostname appears in the list of the hosts
with of course the same IP and the same MAC address.

Hi,

··· On 26. 04. 13 09:39, Guillaume Thouvenin wrote:

I’m doing an installation of an ubuntu 12.04 and I’m using the three
templates: PXELinux Template, finish Template and provision Template.

The problem I have is that the machine is running the finish.sh script
with the hostname that is still set to unassigned-hostname. So a
machine called unassigned-hostname appears in the list of the hosts
with of course the same IP and the same MAC address.

I’ve experienced the same problem when the DHCP server wasn’t providing
a correct hostname to the client during installation.

Hope this helps,

Fran�ois

Yes that was it. I used the PXE default file with unassigned-hostname and
thus, dnsmasq stored it for future request. So when ubuntu set up the
network during the installation the dns answered with unassigned-hostname.
I replaced the PXE file by the one provided that Greg but as I didn't
restart dnsmasq I had the same result. I think it is because it was stored
in /var/lib/dnsmasq/dnsmasq.leases. So I rebooted the dnsmasq and now it
is working :slight_smile:

Thanks guys for the help,
Guillaume

··· On Friday, April 26, 2013 11:25:32 AM UTC+2, François D. wrote: > > I've experienced the same problem when the DHCP server wasn't providing > a correct hostname to the client during installation. >