Red Hat Bugzilla – Bug 977635
Hostname set by kickstart for DHCP does not survive reboot
Last modified: 2013-07-31 04:05:21 EDT
Description of problem:
When setting a hostname for a DHCP interface in kickstart, the desired hostname is not set as static hostname, and does not survive reboot into the installed system. If the hostname is configured via the interactive graphical interface, it behaves as expected (the hostname is preserved in the installed system).
My DHCP server is ISC, and is not sending the hostname, but constructs a hostname in the absence of one being sent. It seems my installation is picking this up from doing a reverse lookup of its IP and setting that as the static hostname.
Version-Release number of selected component (if applicable): anaconda-19.30.9-1.fc19.x86_64
How reproducible: Every time.
Steps to Reproduce:
1. Construct a kickstart file with network declarations like so:
network --bootproto=dhcp --device=eth0 --noipv6 --activate
Actual results: hostnamectl in the installed system should show "lotho.minas.tirith"
Expected results: hostnamectl in the installed system shows "client-525400391749.minas.tirith"
Additional info: I've been doing my tests with a network install of the FC19 TC6 DVD install in KVM using virt-manager.
I have found a workaround, it seems. With the following %post script I get the desired result:
echo "lotho.minas.tirith" > /etc/hostname
But with the following %post script I do not:
hostnamectl set-hostname "lotho.minas.tirith"
*** This bug has been marked as a duplicate of bug 981934 ***