Providing Read/Write permission to "etc" in Read only Rootfile system #zeus #yocto


Poornesh G ( India - Bangalore )
 

Greetings !

I am working on NXP's i.MX6UL SoC and I have successfully built a Read-only Rootfile system through Yocto.
Now I am having a requirement of making only "/etc" as Read & Writable .
So , Can any one suggest me the procedure for making only "/etc" directory as Read & Writable and by keeping rest (/usr , /lib , /bin , ..) as Read-only  through Yocto .

Thanks in Advance


Quentin Schulz
 

Hi,

On 7/20/22 12:17, poornesh.g@... wrote:
Greetings !
I am working on NXP's i.MX6UL SoC and I have successfully built a Read-only Rootfile system through Yocto.
Now I am having a requirement of making only "/etc" as Read & Writable .
So , Can any one suggest me the procedure for making only "/etc" directory as Read & Writable and by keeping rest (/usr , /lib , /bin , ..) as Read-only  through Yocto .
This seems like a good use for overlayfs-etc IMAGE_FEATURES? c.f. https://docs.yoctoproject.org/ref-manual/features.html#image-features
See https://docs.yoctoproject.org/ref-manual/classes.html#overlayfs-etc-bbclass on how to configure it.

This seems to have been added in Kirkstone (4.0) release.

Cheers,
Quentin


Michael Opdenacker
 

Hi Poornesh

On 7/20/22 12:17, poornesh.g@... wrote:
Greetings !

I am working on NXP's i.MX6UL SoC and I have successfully built a Read-only Rootfile system through Yocto.
Now I am having a requirement of making only "/etc" as Read & Writable .
So , Can any one suggest me the procedure for making only "/etc" directory as Read & Writable and by keeping rest (/usr , /lib , /bin , ..) as Read-only  through Yocto .

This is not supported in Zeus, but otherwise you may be interested in the "overlay-etc" class:
https://docs.yoctoproject.org/ref-manual/classes.html?highlight=overlayfs#overlayfs-etc-bbclass

Cheers
Michael.

--
Michael Opdenacker, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com