this is a quick personal note for aufs usage on my simpad.
mkdir /mtn/image mkdir /mnt/chroot modprobe fuse sshfs supernova@192.168.1.5:/home/supernova/root/ /mnt/net mount -o loop /mnt/net/rw.img /mnt/image mount none /mnt/chroot -t aufs -o br:/mnt/image=rw:/=ro mount --bind /dev /mnt/chroot/dev mount --bind /var/volatile/ /mnt/chroot/var/volatile/ chroot /mnt/chroot /bin/sh mount /proc mount /dev/shm mount /dev/pts
root@simpad:/$ df -h Filesystem Size Used Available Use% Mounted on tmpfs 484.2M 51.5M 407.8M 11% /mnt/.psplash sysfs 484.2M 51.5M 407.8M 11% /sys tmpfs 2.0M 32.0k 2.0M 2% /dev tmpfs 30.1M 0 30.1M 0% /dev/shm tmpfs 30.1M 116.0k 29.9M 0% /var/volatile tmpfs 484.2M 51.5M 407.8M 11% /media/ram sshfs#supernova@192.168.1.5:/home/supernova/root/ 484.2M 51.5M 407.8M 11% /media/net /dev/loop0 484.2M 51.5M 407.8M 11% /mnt/image none 484.2M 51.5M 407.8M 11% / tmpfs 2.0M 32.0k 2.0M 2% /dev tmpfs 30.1M 116.0k 29.9M 0% /var/volatile tmpfs 30.1M 0 30.1M 0% /dev/shm
current setup
on a server test.img (ext3) -> rw using ssfhs to connect to the server and after this loop mount the image
/mnt/chroot < the chroot environment /mnt/net < sshfs to the server /mnt/image < loop mount the image there
this step is neccesary because aufs cannot handle some fuse stuff
don't forget to get the dev mounted
mount none /mnt/chroot -t aufs -o br:/mnt/image=rw:/=ro mount --bind /dev /mnt/chroot/dev chroot /mnt/chroot /bin/sh remount everything you need!!
/etc/resolv.conf is a symlink -> need to be fixed (maybee also with a --bind mount)
/tmp -> becomming a broken symlink -> need to create /var/volatire/tmp (maybee also with a --bind mount)
todo: