Create overlay in /data for my application

Hello,

Basically I am trying to achieve a delta update on a rpi4 (so rootfs in read only).
I have an application which require read/write capabilities. So I managed to add a script + systemd services that create an overlay for /etc (for network configuration files) and /usr/share (where my application is stored):

#!/bin/bash

/bin/mount none -t overlay -o lowerdir=/etc,upperdir=/data/etc,workdir=/data/work_etc /etc
/bin/mount none -t overlay -o lowerdir=/usr,upperdir=/data/usr,workdir=/data/work_usr /usr

Is this best practices ? Is it going to change my rootfs checksum so i will not be able to perform delta updates anymore ?

Thank you.

I do the same here. Don’t know if it is best practice, for me it works :slight_smile:

Do you know about openembedded-core/meta/recipes-core/volatile-binds/volatile-binds.bb at master · openembedded/openembedded-core · GitHub

If you create a bbappend for this, you just have to extend VOLATILE_BINDS variable with your overlays and no custom scripting or services are needed