On Sat, Jan 28, 2012 at 09:47:16PM +0200, Alan Barrett wrote: > On Sat, 28 Jan 2012, Julian Fagir wrote: > >I've just been trying to mount a tmpfs over a read-only root > >file system. Unfortunately, this won't work just by mounting a > >tmpfs with option union over the root file system. You'd have to > >create a tmpfs, and mount that one with mount_union(8) over the > >root file system, which is again not possible. > > I read your message twice and I still don't know what you mean. > Could you give examples of the commands that you use, and the > errors.
An example of using unionfs, rather than union dirs, is in src/distrib/embedded/mkimage - which unfortunately has too many tmpfs incantations, but does work well for usermode. More should happen in this area in future. I think that I used mount_union as union dirs didn't handle whiteouts properly, but it's been a while, and I didn't write things down from that period. One thing I did find was that some log files are opened O_WRONLY|O_APPEND, and so need to be copied manually into the upper layer first or the corresponding upper-layer entry does not created. Regards, Alistair
