Right, but that's with OverlayFS and such, right? (I.e. not just straight bind mounts.)
Seems awfully complicated to solve what essentially should be a non-problem... (I'm aware OverlayFS has other uses, but in this instance it seems like overkill.)
EDIT: I'll just note, I did say "separate filesystem" (i.e. non-bind), but I guess it might have been easy to miss.
Most probably yes, but there are probably distributions using ro rootfs + specific mounts. I think that in many cases embedded devices would use such a scheme instead of OverlayFS.
EDIT: But you probably have to mount workdir and upperdir somewhere over this ro rootfs for OverlayFS to work.
> EDIT: I'll just note, I did say "separate filesystem" (i.e. non-bind), but I guess it might have been easy to miss.
I was hoping that you could read between the lines also :) I mentioned my WIP distribution. I have mounted:
- squashfs ro on /
- ext4 rw on /mnt/rw
- /mnt/rw/var bind on /var
- /mnt/rw/home bind on /home
Oooh, burn! :) I honestly didn't see any relevant mention of the WIP-distro you're talking about... but now that you mention it I had a look back. "I am working on Linux distribution" (etc.).
> I have mounted:[snip]
So... separate file systems.
You could use two partition update scheme as ChromeOS. I am working on Linux distribution that have rootfs as a squashfs image and I want to have as painless updates as on ChromeOS.
> Also, wouldn't mounting /var, /home etc. RW on top of a RO-mounted / require that they were actually on different file systems? I don't think you can have a RW bind mount on a RO-mounted file system. (Haven't tried it, though.)
You can mount RW fs on RO fs. Distributions on Live-CDs do it all the time.