On an embedded device based on Yocto Linux my rootfs is RO, while I have an additional partition for RW data. Now I want to automount at boot an overlay onto /etc stored on a different partition. Here is my fstab:
/dev/mmcblk0p6 /data_local ext4 defaults,sync,noexec,rw 0 2
[...]
overlay /etc overlay defaults,lowerdir=/etc,upperdir=/data_local/overlayfs/upper/etc,workdir=/data_local/overlayfs/workdir,X-mount.mkdir,x-systemd.requires=/data_local,x-systemd.before=local-fs.target,x-systemd.before=systemd-networkd 0 0
However, this fails because the upperdir and workdir directories are missing on first boot. How can I let fstab or systemd.mount automatically create these directories?
Asked by Martin H.
(201 rep)
Mar 18, 2024, 03:29 PM
Last activity: Apr 21, 2025, 03:08 PM
Last activity: Apr 21, 2025, 03:08 PM