Hello
First I am using ubuntu 7.04 with kernel 2.6.20-16 .
Trying to set up a readonly root filesystem using aufs, with /etc /tmp and /var
to be rw on a different partition.
So 1 part / is ro , /mnt/rw is another partition rw
I couldn't mount /etc or /var after system startup, there ware a lot of
problems. So I found that i could do it in the init scripts so
I added these lines to /etc/init.d/rcS
/bin/mount -n -t xfs /dev/sda2 /mnt/rw
/bin/mount -n -t aufs -o br:/mnt/rw/etc:/etc none /etc
echo "none /etc aufs br:/mnt/rw/etc:/etc 0 0 " >> /etc/mtab
witch actualy works prety good. Interesting is that the information writen to
mtab disappears , maybe gets overwriten by some ohter init scritp..?
Another thing I can't do /var here, but if I put it to /etc/fstab it goes ok.
And I set the / partition in fstab to get mounted read only.
The system works ok, even if it took me a while to figure this way out , but I
can't change nothing on /etc or /var because I can't unmount them
I remount the / as rw of course before.
For umount /var I get
/var must be outside
mount : var not mounted already, or bad option
and for umount /etc I get
umount: /etc: device is busy
my /proc/mounts file has a /var line but no .. etc.. but can't umount event the
var
So How can I write to /etc and /var original directories, bypassing aufs after
remounting / as rw
PLEASE HELP
____________________________________________________________________________________
Looking for last minute shopping deals?
Find them fast with Yahoo! Search.
http://tools.search.yahoo.com/newsearch/category.php?category=shopping
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/