[systemd-devel] Read-only /etc, machine-id with an overlay - journald failing

Mantas Mikulėnas grawity at gmail.com
Thu Feb 27 15:39:27 UTC 2020


On Wed, Feb 26, 2020 at 11:59 AM Andreas Kempe <andreas.kempe at actia.se>
wrote:

> Hello everyone,
>
> I'm working in a project with an embedded Linux system based on
> Openembedded using Systemd version 241 as our init process. We're
> using a read-only /etc. To facilitate development, we want to use a
> writeable overlay on /etc, but we ran into an issue.
>
> When we start, Systemd detects that there is no machine-id file
> present in /etc so it generates and mounts a /etc/machine-id. When our
> mount unit then applies the overlay on /etc, it hides the mounted
> file. Journald later fails to start because /etc/machine-id isn't
> visible through the overlay.
>
> At this point we're considering a number of workarounds, but I thought
> it worthwhile asking the experts before we go patching Systemd or
> similar.
>
> My gut feeling is that using overlays on /etc can't be that uncommon
> and it is likely PEBKAC on our end. Is there some canonical way of
> doing overlays with Systemd and we're screwing things up?
>

If you have an initramfs, consider setting up the /etc overlay there
instead.

-- 
Mantas Mikulėnas
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20200227/23d38ded/attachment.htm>


More information about the systemd-devel mailing list