[yocto] How handle files needing updates in read-only filesystem

Anders Darander anders at chargestorm.se
Wed Jun 13 06:20:09 PDT 2018


* Ulf Samuelsson <yocto at emagii.com> [180612 22:01]:

> We want most of /etc to be read-only for security reasons,
> and the overlayfs will make the whole of /etc writeable.

> I tried mount —bind /etc/timezone /persistent/etc/timezone, and it
> complained that they were not directories. Bind mounting /etc again
> will make all of /etc writeable.

Try to use: mount —o bind /etc/timezone /persistent/etc/timezone

I'm using that heavily, either manually or by the volatile-binds recipe.
It works perfectly fine with files.

> Symlinking to /persistent is fine, so the question is what an
> acceptable method is to have a simple way of ensuring that a certain
> file is converted to that symlink.

This is normally done by a manual inspection / addition of bbappend
file.

Cheers,
Anders
-- 
Anders Darander, Senior System Architect
ChargeStorm AB / eStorm AB


More information about the yocto mailing list