Red Hat Bugzilla – Bug 53081
Installer gets DHCP'ing hostnames wrong
Last modified: 2007-04-18 12:36:49 EDT
Description of Problem:
I've done two installs or RC2 onto two different machines that are DHCP
clients. One install was text-based via ftp, the the other a GUI install
via NFS. The problems is that I was never prompted for the name of the
machine, and after an otherwise good installation, the machine reboots
and is "localhost.localdomain". /etc/sysconfig/network has
HOSTNAME=localhost.localdomain, and /etc/hosts only has the one 127.0.0.1
It's annoying to boot to "localhost" named machines.
Version-Release number of selected component (if applicable):
Install to a DHCP'ing host
This is probably a dupe of this issue, it comes up from time to time.
Do you have working reverse DNS for your DHCP'd hosts? With DHCP, we use the
reverse dns given and otherwise fallback to localhost.localdomain. This is the
most predictable and the most "correct" way to avoid breaking apps
Ah... that explains it. The two IPs that I used to install RC2 did not have reverse
resolutions. But many IPs won't have PTR reverse-records... why not prompt for a
hostname in those cases? Couldn't you just place the user-supplied hostname on
the 127.0.0.1 line in /etc/hosts?:
127.0.0.1 localhost hostname localhost.localdomain
My thinking behind this is that we don't always get the same IP if we use DHCP
(reverse lookups aside), but we do always have loopback (which is the entire
point of loopback).
This breaks several applications and we've been around this half a dozen other
times. Answer -- if using dhcp, make dns work, otherwise fix /etc/hosts
yourself and pick up the pieces of the apps that break :) It's, unfortunately,
the best solution at the present time.