hostname command returns localhost.localdomain in kickstart post section when hostname is specified in kickstart network command

Solution In Progress - Updated -

Environment

Red Hat Enterprise Linux 6.4

Issue

  • hostname command returns "localhost.localdomain" in %post section of kickstart.
  • hostname is specified in the kickstart network command.

Resolution

  • Returned DNS to working state

Root Cause

  • DNS was not available in customers location

Diagnostic Steps

/var/log/anaconda.log in sosreport:

18:23:35,365 INFO    : activating first device from kickstart because network is needed
...
18:23:37,375 INFO    : setting specified hostname of host12345

"host12345" was specified in kickstart as hostname.

/var/log/anaconda.syslog in sosreport:

18:23:42,852 INFO kernel:cnic: Broadcom NetXtreme II CNIC Driver cnic v2.5.13 (Sep 07, 2012)
18:23:42,863 INFO kernel:Broadcom NetXtreme II iSCSI Driver bnx2i v2.7.2.2 (Apr 26, 2012)
18:23:42,863 NOTICE kernel:iscsi: registered transport (bnx2i)
18:23:47,046 DEBUG kernel:eth0: no IPv6 routers present
18:23:47,285 DEBUG kernel:eth2: no IPv6 routers present
...
18:23:48,155 DEBUG kernel:eth1: no IPv6 routers present
...
18:23:49,030 INFO NetworkManager: <info> Setting system hostname to 'localhost.localdomain' (address lookup failed: -3)

It looks that NetworkManager reset the hostname after setting it upon the hostname specified in kickstart.

This solution is part of Red Hat’s fast-track publication program, providing a huge library of solutions that Red Hat engineers have created while supporting our customers. To give you the knowledge you need the instant it becomes available, these articles may be presented in a raw and unedited form.

Close

Welcome! Check out the Getting Started with Red Hat page for quick tours and guides for common tasks.