[OE-core] [PATCH] systemd-compat-units: drop machineid.service

Burton, Ross ross.burton at intel.com
Wed Dec 18 15:03:58 UTC 2013


On 12 December 2013 11:33, Koen Kooi <koen at dominion.thruhere.net> wrote:
> Op 12 dec. 2013, om 11:04 heeft Ross Burton <ross.burton at intel.com> het volgende geschreven:
>
>> systemd will create the machine ID automatically if it isn't set,
>
> That's not the whole story, it will generate a new one every boot

It will generate a new one on boot *if* /etc/machine-id doesn't
contain a valid ID.  If /etc is read-write then this happens once on
first boot.

>> so this unit doesn't serve any purpose.
>
> That's correct, you need to generate it offline, since /etc/machine-id is a bind mount after booting :(

Why is that bad?  In the read-only-rootfs case you can either pre-seed
the machine ID at image creation time (if a single machine ID across
all instances is reasonable) or let systemd create a fresh one on
every boot in /run/machine-id and bind-mount /etc/machine-id to it.

Ross



More information about the Openembedded-core mailing list