schroot | |
Thursday Oct 3 9:22:41 2013 | |
During this week I've spent some time looking for a script to creat | |
a chroot automatically, with minimal manual intervention. I found t | |
very nice looking scripts but much to my surprise they both mention | |
an incredibly handy tool called "schroot". | |
At first I didn't give it much credit, there are so many programs o | |
there and they are all so useful for some people, but it is not ver | |
likely that all software is useful for all people. Such is life! | |
In the end I decided to give it a try. And guess what? It really le | |
me stunned. Yeah, believe it or not I constantly use chroots for te | |
always as root, and as you can imagine, after all the testing is do | |
the chroots usually end up in a nearly unusable state. Then what I | |
is building another chroot, hence my quest for a script to automati | |
part of the process. | |
Well, what "schroot" does is allowing you to enter a chroot without | |
root privileges, and what is even better, all changes disappear aft | |
you leave the chroot (unless you want to keep the session open for | |
a later time, or another day...) | |
All you need to use schroot is a config file /etc/schroot/schroot.c | |
which can be really simple. Mine looks like this: | |
[sid] | |
description=Debian sid (unstable) | |
directory=/sid | |
users=chals | |
The description line is optional, the directory is the location of | |
the chroot and the users= field is your username. | |
Then simply open a terminal and type: | |
$ schroot -c sid | |
And there you are. You are a regular user inside the chroot. | |
Have fun! |