How can I transfer read/write directories in separate partition to set rootfs readonly?

Hi

I want to set the rootfs readonly with the Yocto flag “read-only-rootfs”.
If I use this flag some errors from some packages appear:

Package hostapd
Package u-boot-fw-utils
Package base-files
Package init-ifupdown

How can I set the file access from these packages to a writable partition outside rootfs?

Regards
Michael

Have you followed this document?
https://www.yoctoproject.org/docs/2.6/dev-manual/dev-manual.html#creating-a-read-only-root-filesystem

Hi

Thank you for your answer.

Yes, but this document is very general. I understand that every (YOCTO-)part which wants to write must write elsewhere outside the Readonly-Rootfs.

But for my concrete case is must know:

  • What and where do these packages write their data?
  • Where and when (startup script?) do I have to set the links to a writeable partition?
  • What is the needed FLASH space for these data?
  • Do you have a small concrete example?

Regards
Michael

Hi

I found out that these errors above came from using the “pkg_postinst_ontarget_${PN}()” functions together with a set “read-only-rootfs”.

There is a lot of code in all these functions used by DIGI bbappend recipes.

How can I realize a readonly Rootfs with these functions?

Regards
Michael