Re: Systemd, overlayfs, and machine-id problem

Morten Bruun

Thanks for the suggestion!

On Tue, Oct 27, 2020 at 4:35 PM nefethael <> wrote:

In my project, I ended up by overlaying not the entire /etc but only subparts I needed to modify.
(/etc/machine-id is maybe already a bind mount from /run/machine-id)
Hope it helps,

If I should overlay just part of /etc I'm down to single files - and that does not seem to be possible. 

I'm trying to figure out if I can solve my problem using bind mounts instead.

Otherwise I will have to skip the systemd test during for testimage or create our own version of it.


Le mar. 27 oct. 2020 à 16:24, Khem Raj <raj.khem@...> a écrit :

On 10/27/20 2:23 AM, Morten Bruun wrote:
> Hi,
> In our current Yocto project we are using an overlayfs on top of /etc
> This seems to trigger the systemd-machine-id-setup service which fails
> with the error below:
> systemd-machine-id-setup[204]: Failed to unmount transient
> /etc/machine-id file: Invalid argument.
> The failed service then triggers an error in the test_systemd_failed
> test in the systemd testimage suite.
> As far as I understand the machine-id setup is triggered because
> path_is_mount_point() can report false positives when using overlayfs.
> Is there a way to fix this?

maybe pregeenerate machine ID sometimes you can seed it from CPU Id or
soc ID from eeprom.

> Kind regards,
> Morten



Morten Bruun

e: morten@...

t: +45 2968 2241


Join to automatically receive all group messages.