Hi. I am working on an embedded system that has an SD card for the main filesystem. I would prefer to have the root filesystem mounted readonly so I could mitigate damage to the filesystem by people just turning it off and to prevent changes to the system. There really isn't a good way to ensure it will be shut off cleanly and not just have the power removed.
Anyway what I am currenly doing in the initramfs is the following mount /dev/sd /root load aufs if available mount -o move /root /root.ro mount -t tmpfs root.rw /root.rw mount -t aufs -o "dirs=/root.rw=rw:/root.ro=ro" root.union /root mount -o bind /root.ro /root/root/ro mount -o bind /root.rw /root/root/rw I got all this from an article I found somewhere. At the end of the initramfs it then switches over to use /root as /. Anyway, the end result is that aufs is mounted with my SD card as the readonly template and a tmpfs on top of that for writes. I then have the /root/ro mount point where I can go in there and make permenant changes to the system if needed. The problem I'm wondering about is that the underlying filesystem is still mounted readwrite so there's still a small chance of filesystem corruption. Is it possible to mount that layer readonly but remount it while the system is running if I need to update any files on the system? I think the answer is no and that I'll just have to reboot the system if I want to get that effect but I want to check Also is there a good place to get other documentation that explains the concepts of the whiteouts? I'm sure I'm missing some interesting effects when I read the man page simply because I don't know some of the concepts -- Matthew Harrell Bit Twiddlers, Inc. [email protected] ------------------------------------------------------------------------------ Apps built with the Adobe(R) Flex(R) framework and Flex Builder(TM) are powering Web 2.0 with engaging, cross-platform capabilities. Quickly and easily build your RIAs with Flex Builder, the Eclipse(TM)based development software that enables intelligent coding and step-through debugging. Download the free 60 day trial. http://p.sf.net/sfu/www-adobe-com
