Re: Re: Re: Getty is spawning to early
Bob Proulx wrote:
Tim Heckman wrote:
Luckily the two of these issues won't come in to play here. This is
going to be used on a system that does not have X installed and will
have a static IP address. We use DHCP to assign the address as it
is easier to deploy a new distribution for our customers.
The language you are using is confusing. If it has a static address
then you wouldn't be assigning it using dhcp.
I think you really mean to say that you have your dhcp server
configured to assign addresses by ethernet address? So that the dhcpd
will always be assigning the same address? That isn't the same as a
static ip address.
The language used can really confuse things sometimes.
My apologies for using such convoluted terminology. Our customers are
assigned an IP address and the backend systems configure the DHCP
servers to only provide that instance with that IP address. So you are
correct that DHCP is configured to assign the IP address based on the
The last time dhclient was attempted with this would have been on
Debian 5.0. In our most recent Debian 6.0 template someone decided
to use dhcpcd,
What were they using before?
In Debian 5.0 dhcp3-client was the package provided on the default
Debian install. Debian 6.0 has switched over to isc-dhcp-client now.
but it requires additional configuration for someone to set their
own hostname later on. Not an ideal situation as it is not the
default dhcp system and so people do not expect it.
Sorry but I don't understand. DHCP normally does not set the
hostname. Normally DHCP only sets the network device address and
associated configuration such as gateway and nameservers. Trying to
set the name from the dhcp server isn't very common. People have done
it on occasion. But it definitely isn't the mainstream.
I was comparing dhcp3-client to dhcpcd. In dhcp3-client you only needed
to set your own hostname by placing information in "/etc/hostname" and
it worked. The "/sbin/dhclient-script" script handled this perfectly.
In Debian 6.0 it was switched to isc-dhcp-client and a bug was
introduced in Debian 6.0 (that's filed, yet still outstanding) where
this logic no longer works.
>In my case I ended up setting the hostname to localhost. Since the
>client machines are true thin clients without any external services
>they don't need to have a hostname. That worked best for me. Perhaps
>it is something that might be a good option for you? Then it would be
>very similar to any live-cd boot system.
This doesn't work unfortunately. I work for a popular
cloud-services (VPS) provider and this is the template that is being
built for deployment of Debian 6.0 systems moving forward. This is
the only thing holding me back from being able to replace the
So you are actually trying to build a virtual machine disk image.
That's great. But that doesn't explain why you can't simply assign a
hostname then. I am sure you have a good reason but just haven't said
yet why your hostname must be tied to the IP address. Instead of
being independent of it.
Every VPS I have used assigned me one or more IP addresses. That was
set up in /etc/network/interfaces as a static assignment. At that
point the choice of hostname was mine to make.
Historically we've done this. When a new instance is created we assign
it with an IP address. Each of our IPs has a PTR record that is
partially derived from the address itself. For every other distribution
(Debian 5.0, Ubuntu 10.04 LTS, Ubuntu 11.10, ArchLinux, CentOS 5/6,
etc.) we set the hostname on first boot via DHCP and it works. This has
become the expected configuration on a freshly booted instance.
The only time I've seen that done is when you're running OpenVZ and any
administrator is able to jump in to your container. We do not access
customer's instances, nor do we only operate Debian-derived distributions.
The purpose of this configuration is for a customer to deploy this
distribution template and be assigned an IP address, a hostname that
is not personal, and be good to go. They can then override dhcp
setting the hostname by placing information in '/etc/hostname'.
I am still not seeing why you can't simply assign the IP address and
then let the client pick their own hostname as they want.
They are more than welcome to do that after the first boot, but this is
how it's been done historically and on all current distribution templates.
It's a unique use-case, but in theory it should work. Getty is just
a bit too energetic. :p
If you are setting up a virtual machine image then that isn't that
unique of a case. :-)
Indeed. But having DHCP set the hostname is definitely a unique use-case.
Thanks for the insight and input, Bob. If I wish I would be able to
use one of your recommendations as it would be easier. But just
doesn't fit my needs.
I am sure you have reasons but so far I don't see it yet.
Hopefully I've been able to clear up some confusion about my reasons