Re: [yocto] overlayfs-etc on top of dm-verity?
Michael Opdenacker <[email protected]> Thu, 9 Apr 2026 21:18:21 +0200
| Newsgroups | org.yoctoproject.lists.yocto |
|---|---|
| Message-ID | <[email protected]> |
Hi Francesco, On 3/26/26 11:19 PM, Francesco Valla wrote: >> The code looks right though, I need to understand why this happens. >> >> Another weirdness that remains is these volatile mounts for /var/cache/, >> /var/lib, /var/spool and /srv, which I didn't have with a regular read-only >> root filesystem. > AFAIK, this should be the regular behavior on a read-only root > filesystem. The overlayfs mounts are created by services generated by: > > meta/recipes-core/volatile-binds/volatile-binds.bb > > depending on the content of the VOLATILE_BINDS variable. For each couple > of upperdir-lowerdir specified there, a service is generated that > starts only if upperdir's parent is writable and lowerdir is not. > > E.g.: > lowerdir=/srv > upperdir=/var/volatile/srv > > In a vanilla openembedded-core system, a tmpfs is mounted on /var/volatile > by the fstab (that is, by the fstab systemd generator), so the > upperdir's parent directory (which is the same /var/volatile) is writable. > > You can force a copy+bind behavior setting AVOID_OVERLAYFS=1. I didn't thank you for these great clarifications and tips. It's good to understand the "magic". I eventually dropped overlayfs-etc and started implementing specific mount points using VOLATILE_BINDS indeed (with AVOID_OVERLAYFS=1). It's a very easy to use mechanism thanks to the volatile-binds.bb recipe. Thanks again, you made my day! Cheers Michael. -- Root Commit Embedded Linux Training and Consulting https://rootcommit.com