[systemd-devel] Dealing with read-only rootfs

Jérémy Rosen jeremy.rosen at smile.fr
Sun Jun 17 16:58:41 UTC 2018


Hello everybody

I am trying to understand the recommanded way to deal with read-only 
rootfs...

my understanding is that (slightly simplified)
* /run must be a tmpfs
* /var must be writable, and will usually be persistant (can be a tmpfs too)
* everything else can be read-only

My problem comes with populating an empty /var. There seems to be hints 
to a systemd-provided mechanism to do that, but I can't find any 
documentation for it

Apparently, tmpfiles.d should copy the content from /usr/share/factory 
to /var when /var is empty, but I can't find what actually implements that

* is it dynamically added in /run ?
* is it just a recommanded way, and I have to implemented myself ? if 
yes, is the directory /usr/share/factory documented anywhere ?
* what qualifies as "empty /var" ? (this is mostly about being robust to 
power-loss during the copying of /var)

Any hints would be welcomed

thx
Jeremy


-- 
SMILE <http://www.smile.eu/>

20 rue des Jardins
92600 Asnières-sur-Seine

	
*Jérémy ROSEN*
Architecte technique
Responsable de l'expertise Smile-ECS

email jeremy.rosen at smile.fr <mailto:jeremy.rosen at smile.fr>
phone +33141402967
url http://www.smile.eu

Twitter <https://twitter.com/GroupeSmile> Facebook 
<https://www.facebook.com/smileopensource> LinkedIn 
<https://www.linkedin.com/company/smile> Github 
<https://github.com/Smile-SA>


Découvrez l’univers Smile, rendez-vous sur smile.eu 
<http://smile.eu/?utm_source=signature&utm_medium=email&utm_campaign=signature>

eco Pour la planète, n'imprimez ce mail que si c'est nécessaire
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/systemd-devel/attachments/20180617/04c56c15/attachment.html>


More information about the systemd-devel mailing list