Hello,
We would like to have a ROFS volume on which the whole fs is and writeable 
config volume on which with have the same /etc.
Current kernel is 5.11
I have done an /etc/ overlay using the service var-volatile-etc for the RO FS. 
And then added another service to either mount the config /etc on top of the 
/etc  overlay when the config volume is rw or mount the config volume to a temp 
directory and then overlay it to the /etc/ overlay when the volume is RO.

It seems to be working as I am able to disable our  services (bit, sensor) on 
config volume and they don't start.
Also the OOB address is assigned from the configuration file.

Then I found 
https://lists.freedesktop.org/archives/systemd-devel/2019-February/042151.html 
further below in quote:

So is it my understanding that as long as the mount or overlay happen early 
enough which is around the service for var-volatile-etc then there is a rescan 
and all config from the /etc in the volume will be used then?

Following the thread, I also saw that it is advised to use initramfs. I am not 
clear why that makes a difference. This thread being 2 year old there may thing 
I am not aware of.
Cheers.


"> 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"."

Cheers,
Renaud


_______________________________________________
systemd-devel mailing list
systemd-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/systemd-devel

Reply via email to