Bug 977635 - Hostname set by kickstart for DHCP does not survive reboot
Hostname set by kickstart for DHCP does not survive reboot
Status: CLOSED DUPLICATE of bug 981934
Product: Fedora
Classification: Fedora
Component: anaconda (Show other bugs)
19
Unspecified Unspecified
unspecified Severity unspecified
: ---
: ---
Assigned To: Anaconda Maintenance Team
Fedora Extras Quality Assurance
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-06-24 23:10 EDT by Martin Jackson
Modified: 2013-07-31 04:05 EDT (History)
9 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2013-07-31 04:05:21 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Martin Jackson 2013-06-24 23:10:55 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
network  --hostname=lotho.minas.tirith

2.
3.

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.
Comment 1 Martin Jackson 2013-06-24 23:36:31 EDT
I have found a workaround, it seems.  With the following %post script I get the desired result:

%post
echo "lotho.minas.tirith" > /etc/hostname
%end

But with the following %post script I do not:

%post
hostnamectl set-hostname "lotho.minas.tirith"
%end
Comment 2 Radek Vykydal 2013-07-31 04:05:21 EDT

*** This bug has been marked as a duplicate of bug 981934 ***

Note You need to log in before you can comment on or make changes to this bug.