[OE-core] [PATCH] systemd-compat-units: drop machineid.service
Koen Kooi
koen at dominion.thruhere.net
Wed Dec 18 15:42:30 UTC 2013
Op 18 dec. 2013, om 16:03 heeft Burton, Ross <ross.burton at intel.com> het volgende geschreven:
> 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.
Right, booting with 'ro' in the kernel cmdline will prevent that from happening, which means...
>
>>> 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.
... every boot you get a new machine ID and hence a new journal ID, which sucks. We can debate if that sucks more or less than having duplicate machine IDs across the boards on your desk :)
regards,
Koen
More information about the Openembedded-core
mailing list