public inbox for yocto@lists.yoctoproject.org
 help / color / mirror / Atom feed
From: Michael Opdenacker <michael.opdenacker@rootcommit.com>
To: Francesco Valla <francesco@valla.it>
Cc: michael.opdenacker@rootcommit.com, yocto@lists.yoctoproject.org,
	Vyacheslav Yurkov <uvv.mail@gmail.com>
Subject: Re: [yocto] overlayfs-etc on top of dm-verity?
Date: Thu, 9 Apr 2026 21:18:21 +0200	[thread overview]
Message-ID: <05cc6299-d354-4b9b-b0d9-2c9e02ef986f@rootcommit.com> (raw)
In-Reply-To: <acWttty52EgZmIn5@bywater>

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



      reply	other threads:[~2026-04-09 19:18 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-25 21:20 overlayfs-etc on top of dm-verity? Michael Opdenacker
2026-03-26  9:56 ` Michael Opdenacker
2026-03-26 17:41   ` Michael Opdenacker
2026-03-26 22:19   ` [yocto] " Francesco Valla
2026-04-09 19:18     ` Michael Opdenacker [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=05cc6299-d354-4b9b-b0d9-2c9e02ef986f@rootcommit.com \
    --to=michael.opdenacker@rootcommit.com \
    --cc=francesco@valla.it \
    --cc=uvv.mail@gmail.com \
    --cc=yocto@lists.yoctoproject.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox