[systemd-devel] Starting services enabled by filesystem overlay over /etc/

Andrei Borzenkov arvidjaar at gmail.com
Sun Feb 10 08:06:59 UTC 2019


09.02.2019 21:45, Matt Schuckmann пишет:
> I have an embedded system with a readonly rootfs.
> 
> I've setup a very early service that mounts a writable aufs overlay over /etc/.
> 
> 
> The problem I'm having is systemd is not starting any services that I have enabled in that overlay that were not initially enabled in the readonly rootfs.
> 
> ?I've tried placing a calls to systemctl daemon-reload or systemctl daemon-reexec just after mounting the overlay but the services are not started, after the fact systemctl will report that the services are enabled but inactive.
> 

If you are doing it as part of normal startup, then systemd has already
computed initial "transaction". While daemon-reload makes it rescan for
and see additional unit definitions, it does not change currently
running "transaction".

> 
> What do I need to do to get systemd to automatically start the services that are marked enabled in that overlay?
> 

I am not aware of any clean way to do it. Attempting to re-queue start
of default.target will likely be noop as this request is already queued.

The only workaround I can think of is to make initial boot into target
that mounts overlay and then triggers start of actual default target.


More information about the systemd-devel mailing list