In my last post, we setup a chroot environment for our RPM based distribution in
/srv/chroots/rhel6-ppc
. Now we'll setup schroot
so we can access this environment as if it were the booted system, and using a union type scheme (an schroot
configuration setup) so that we will always have a pristine environment for builds and such.So let's look at
/etc/schroot/schroot.conf
and 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
overlayfs
for union mounting the original. This means that after you exit a newly created schroot
for this entry, it will be purged and the original chroot will not be changed.Also, the
profile=default
means it will use configurations from /etc/schroot/default/
. Make sure to add yourself to the adm
group or run schroot
as root.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!
No comments:
Post a Comment