Switching to randomly generated hostnames

Daniel Drake dsd at laptop.org
Wed May 2 10:52:28 EDT 2012

On Tue, May 1, 2012 at 4:49 PM, John Gilmore <gnu at toad.com> wrote:
>> 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
> flash?

Good point.

>> 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.

You're right. When I wrote "hex digits" I actually meant to write "hex
bytes". i.e. I was not suggesting that we reduce the amount of data,
only change where it comes from.


More information about the Devel mailing list