Switching to randomly generated hostnames

Walter Bender walter.bender at gmail.com
Tue May 1 11:35:44 EDT 2012

On Tue, May 1, 2012 at 11:29 AM, Daniel Drake <dsd at laptop.org> wrote:
> Hi,
> 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.
> When no hostname is set in this way, networking doesn't work properly,
> since we don't create a network config (oops).
> Also, the hostname must be unique within a group of peers for
> avahi-based collaboration to work (as we've learnt from painful
> experience).
> We could harden up our initialisation to work better in the face of no
> MAC address being available on first boot, but actually that is
> becoming more complicated (due to increased parallelisation, the
> network adapter will now come up late in boot). Moving to a simpler
> scheme would solve the issues seen in the field and avoid the
> challenges around network device initialisation.
> 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.)

+1 (it greatly decreases the odds of a collision and carries no overhead.)


> As far as I can see, the hostname is not really of relevance to
> anything except avahi. It is not broadcast to the DHCP server when
> connecting to a network, for example.
> Any thoughts/objections?
> Thanks,
> Daniel
> _______________________________________________
> Devel mailing list
> Devel at lists.laptop.org
> http://lists.laptop.org/listinfo/devel

Walter Bender
Sugar Labs

More information about the Devel mailing list