Fix for fscrypt folder on rw layer in overlayfs
I posted about the problem this morning:
- Found a reason why overlayfs is flakey — October 18, 2025
Overlay is treating the encrypted '.session' folder as a separate filesystem. The requirement is that workdir be in the same filesystem. Therefore, this should fix it:
# mount -t squashfs -o ro,loop,noatime easy.sfs ro1
# mount -t overlay -o \
xino=on,nfs_export=off,index=off,uuid=null,verity=off,redirect_dir=nofollow,metacopy=off,\
lowerdir=ro1,upperdir=easyos/.session/session,workdir=easyos/.session/tempwork
overlay top1
# touch top1/opt/file1
What I did is move the contents of '.session' into a sub-folder 'session', and also created '.session/tempwork' folder. Then ran the above overlay mount, and success.
Good, there is a fix. Bad because it is a major structural
change. It should be not to onerous to make that change; ok for
newcomers, but it will need special code in the initrd to fix when
updating the version -- and rollback is going to be a
headache.
Tags: easy