I’m trying Kinoite and want to understand how the read-only mechanism for the (mounted /) is achieved.
If I look at the output of mount or findmnt, it looks like / has rw (read-write) rights.
I also “found out” that a write to /usr/any gives a “read-only” error, but to /any a “permission denied” error.
I couldn’t really find any explanations except that the root is read-only and so on. But not “how.” Attributes of selinux? Other magic?
Can someone explain it (in a short manner) or has useful links? Thanks!
@Mike B.
Thanks for the reply.
The /sysroot Mount makes clear the can‘t write to /sysroot but (for me) it looks like just an other mount point (like /home) this is Ro.
Writing to /sysroot gives me (as expected) read only error.
@Flo
Do you mean in general or did libostree some background stuff, which blocks write access?
Or with other words: even with mikes answer, it looks for me, that from mount-view / is writeable.
Of course it’s not, but still not see why.
The root file system is mounted read-write from its deployment, the /usr file system is bind mounted read-only from the same deployment and /etc is mounted read-write.
The details are found in /proc/self/mountinfo, although not in a user friendly format.
flatpaks are in a similar way bind mounted from deployment images.
… and with that comes the nice feature that /etc is preserved with each deployment, which saved a few here on the forums after they have made config changes which made their deployment unbootable, yet they could boot into their previous deployment (with non-altered /etc/ contents).