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

Andre McCurdy armccurdy at gmail.com
Wed Jun 13 16:02:50 PDT 2018


On Wed, Jun 13, 2018 at 9:28 AM, Ulf Samuelsson <yocto at emagii.com> wrote:
> Thanks, is it more efficient than symlinking?

Efficient in what way?

Have you looked at the volatile-binds recipe in oe-core? Its job is to
setup enough bind mounts to enable systemd to run from a readonly
rootfs. Although it's currently systemd specific (it only provides a
systemd service file, no init script) it might give you some clues
about how to setup bind mounts at boot time.

> Best Regards,
> Ulf Samuelsson
>
>> 13 juni 2018 kl. 15:20 skrev Anders Darander <anders at chargestorm.se>:
>>
>> * 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
>
> --
> _______________________________________________
> yocto mailing list
> yocto at yoctoproject.org
> https://lists.yoctoproject.org/listinfo/yocto


More information about the yocto mailing list