Switching to randomly generated hostnames

John Gilmore gnu at toad.com
Tue May 1 18:49:22 EDT 2012

> Currently, XO hostnames are set on first boot in the following format:
> xo-A-B-C
> Where A, B and C are the last 3 bytes of the MAC address expressed in hex.
> In Nicaragua we are seeing cases where XOs have no hostname set, both
> on XO-1 and XO-1.5. On XO-1 this is presumably because libertas
> usb8388 init was never 100% reliable, and on XO-1.5 its presumably
> because the wireless card was DOA but was replaced after first boot.

Why would we need to get it from the wireless card?  Isn't the
laptop's MAC address stored in the manufacturing data in motherboard

But if for some reason you can't use that...

> I propose we move to generating hostnames in the same format as before
> (xo-A-B-C), but with A, B and C assigned as random hex digits on first
> boot.
> (If people are worried about collisions, maybe we add a D digit.)

Existing hostnames have three bytes of info (e.g. xo-12-3a-49).  
Particularly if you're going to generate them at random rather than 
by prior assignment like MACs, why reduce the amount of unique
information (e.g. xo-1-a-4 or xo-1-a-4-d)?  Producing three random
bytes of info for the hostname, rather than 1.5 or 2 bytes, would
reduce the chance of collisions; and has the advantage of not
changing either the size or format of the hostnames, in case
anything else is depending on it.


More information about the Devel mailing list