Comments on Entering A Safe Mirror When Logging In With Unionfs And Chroot

Entering A Safe Mirror When Logging In With Unionfs And Chroot When reading a 'hint' on the website of LinuxFromScratch I discovered the special capabilities of unionfs, specially in combination with chroot. Later I read a HowTo on a wikiwebsite of Gentoo, about entering a chrooted homedirectory when using a special script as shell. Combining these two brings me to using a chrooted environment, which you enter when logging in as a special user. This environment is a exact copy (mirror) of the system you're working on. Because you're in safe copy of the real system, you can do whatever you like, it will never change the system, everything stays inside the cache (the readwrite branch).

1 Comment(s)

Add comment

Please register in our forum first to comment.

Comments

By: i026e

Thank you for the instruction, but I think it may be worth to make several remarks for ubuntu users.

First of all, you need to replace unionfs with aufs

Also I've met the problem that graphical session does not work for me. The reason is because using display is not allowed for sandbox user. The solution would be to execute "xhost local:" from regular user/

Another problem was network access. I founded out that sandbox has empty /etc/resolv.conf . Maybe, it is because ubuntu's resolv.conf is not a real file but a symlink. After copying the content of main system resolv.conf to sandbox's one, the network access was gained