On Sat, 6 Apr 2024, Tim Woodall wrote:
Hi,
I use lxc-usernsexec to simulate root (and other users) for a non-root
user.
lxc-usernsexec -m b:0:100000:65536
That then chroots into an overlayfs mounted using fuse.
The lowerdir is a mounted squashfs, the upperdir is a regular directory.
squashfuse rootimg.sqfs lower
fuse-overlayfs -o lowerdir=lower,upperdir=upper,workdir=work mount
This is all working nicely, and much faster than extracting a tarfile to
generate the lowerdir which is what I used to do.
But I have to jump through hoops to generate the lower sqfs.
Turns out there was something wrong with my testing. Not exactly sure
what I did wrong but provided you do the mounting inside the container
then it "just works". The hoops are only needed if you want to mount
outside the container.
Tim.