On 08 May 14:35, Peter Palfrader wrote: > On Fri, 08 May 2009, David Weinehall wrote: > > > On Thu, May 07, 2009 at 07:27:08PM -0500, Manoj Srivastava wrote: > > > No. But we do leave /usr read-only the rest of the time, which > > > is often 99.999% of the time. A separate /usr is required for this. > > > > Uhm, no? > > > > mount --bind /usr /usr > > > > Should do the trick (the same mount -o remount,rw / remount,ro then > > applies). all thanks to the magic of subtrees :) > > Yeah. Right. > > wea...@intrepid:~/tmp$ mkdir foo > wea...@intrepid:~/tmp$ touch foo/bar > wea...@intrepid:~/tmp$ sudo mount -o bind,ro foo foo > wea...@intrepid:~/tmp$ touch foo/baz > wea...@intrepid:~/tmp$ > > bind mounts don't do ro.
http://lwn.net/Articles/281157/ As of 2.6.26 it's possible, but still not right: fleur:/tmp# rmdir foo fleur:/tmp# mkdir foo fleur:/tmp# touch foo/blah fleur:/tmp# mount -o bind foo foo fleur:/tmp# mount -o remount,ro foo fleur:/tmp# touch foo/blah touch: cannot touch `foo/blah': Read-only file system fleur:/tmp# umount foo fleur:/tmp# touch foo/blah fleur:/tmp# So it works, just not quite as you'd expect :/ Cheers, -- Brett Parker -- To UNSUBSCRIBE, email to debian-devel-requ...@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmas...@lists.debian.org