In my last post, we setup a chroot environment for our RPM based distribution in
/srv/chroots/rhel6-ppc. Now we'll setup
schrootso we can access this environment as if it were the booted system, and using a union type scheme (an
schrootconfiguration setup) so that we will always have a pristine environment for builds and such.
So let's look at
/etc/schroot/schroot.confand add the following entry:
[rhel6] type=directory union-type=overlayfs description=RedHat Enterprise Linux 6 groups=adm,root directory=/srv/chroots/rhel6-ppc profile=default
This is the basic setup. The key here is that it uses
overlayfsfor union mounting the original. This means that after you exit a newly created
schrootfor this entry, it will be purged and the original chroot will not be changed.
profile=defaultmeans it will use configurations from
/etc/schroot/default/. Make sure to add yourself to the
admgroup or run
In order to try it out, use the following command:
schroot -c rhel6
From here, you can do whatever it is you like to do in your new environment!