public inbox for yocto@lists.yoctoproject.org
 help / color / mirror / Atom feed
* overlayfs-etc on top of dm-verity?
@ 2026-03-25 21:20 Michael Opdenacker
  2026-03-26  9:56 ` Michael Opdenacker
  0 siblings, 1 reply; 7+ messages in thread
From: Michael Opdenacker @ 2026-03-25 21:20 UTC (permalink / raw)
  To: Vyacheslav Yurkov; +Cc: michael.opdenacker, yocto

Hi Slava and community,

Do you know if overlayfs and in particular our overlayfs-etc class works 
when /etc is on a dm-verity root filesystem?

Without dm-verity (regular ext4 or erofs root filesystem), everything 
looks all right:
# mount | grep overlay
/data/overlay-etc/upper on /etc type overlay 
(rw,relatime,lowerdir=/etc,upperdir=/data/overlay-etc/upper,workdir=/data/overlay-etc/work,uuid=on)

When /etc is on /dev/mapper/rootfs (dm-verity), everything seems messed up:
# mount | grep overlay
overlay on /var/cache type overlay 
(rw,relatime,lowerdir=/var/cache,upperdir=/var/volatile/cache,workdir=/var/volatile/.cache-work,uuid=on)
overlay on /var/lib type overlay 
(rw,relatime,lowerdir=/var/lib,upperdir=/var/volatile/lib,workdir=/var/volatile/.lib-work,uuid=on)
overlay on /var/spool type overlay 
(rw,relatime,lowerdir=/var/spool,upperdir=/var/volatile/spool,workdir=/var/volatile/.spool-work,uuid=on)
overlay on /srv type overlay 
(rw,relatime,lowerdir=/srv,upperdir=/var/volatile/srv,workdir=/var/volatile/.srv-work,uuid=on)

Systemd may be messing up, as only in this case, it does:
          Starting Bind mount volatile /var/cache...
          Starting Bind mount volatile /var/lib...
          Starting Bind mount volatile /var/spool...
          Starting Bind mount volatile /srv...

But these bind mounts show up as overlay mounts!

Has anyone already encountered such an issue?
Thanks in advance,
Cheers
Michael.

-- 
Root Commit
Embedded Linux Training and Consulting
https://rootcommit.com



^ permalink raw reply	[flat|nested] 7+ messages in thread
* Re: overlayfs-etc on top of dm-verity?
@ 2026-03-27 13:26 Ayoub Zaki
  2026-03-30 16:51 ` Michael Opdenacker
  0 siblings, 1 reply; 7+ messages in thread
From: Ayoub Zaki @ 2026-03-27 13:26 UTC (permalink / raw)
  To: Yocto-mailing-list, michael.opdenacker

[-- Attachment #1: Type: text/plain, Size: 374 bytes --]

Hi Michael,
From a security perspective I would strongly advise against overlaying the
entire /etc as it undermines the integrity provided by secure boot. Instead
only overlay the specific files that actually need to be modified. In
addition, consider enforcing integrity protection on the upper layer and
consider alternatively switch to bind mounts for those files.

Best

[-- Attachment #2: Type: text/html, Size: 464 bytes --]

^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-04-09 19:18 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
  -- strict thread matches above, loose matches on Subject: below --
2026-03-27 13:26 Ayoub Zaki
2026-03-30 16:51 ` Michael Opdenacker

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox