- Install prerequisites:
aufs-tools and scipts from here (get them with git clone to correctly import symlink)
To check, if aufs is supported by your kernel use these commands:
root:~# modprobe aufs
root:~# lsmod|grep aufs
aufs 182094 0
- Create
/opt/jail-trees, put there create-tree.sh
- Create
/opt/jail, put there mount.sh and symlink to it umount.sh
- Run from inside
/opt/jail-trees (as root):
./create-tree.sh kde3
rm -rf ./kde3/home
- Run from inside
/opt/jail (as root):
- Fix any errors with mount/unmount, so the script will run smoothly without any messages. Check results with
mount command.
- Hooray, we have working jail inside
/opt/jail/kde3! Use it with chroot or more sophisticated schroot.
For chroot run:
chroot /opt/jail/kde3 and add into /etc/jailrc:
then add into .bashrc:
[ -f /etc/jailrc ] && . /etc/jailrc
aufs-toolsand scipts from here (get them withgit cloneto correctly import symlink)To check, if aufs is supported by your kernel use these commands:
/opt/jail-trees, put therecreate-tree.sh/opt/jail, put theremount.shand symlink to itumount.sh/opt/jail-trees(as root):/opt/jail(as root):mountcommand./opt/jail/kde3! Use it withchrootor more sophisticatedschroot.For
chrootrun:chroot /opt/jail/kde3and add into/etc/jailrc:then add into
.bashrc: