[PLUG] schroot

Jim Sheldon jims at russound.com
Fri Oct 2 14:04:54 UTC 2009


I'm a huge fan of schroot!

Here is a little trick that I have found extremely useful for the Linux
build systems that I manage.  We have an Ubuntu Hardy build server with
Debian lenny and etch chroots, and this in /etc/rc.local:


# clear out any old/stale sessions
for SESSION in `schroot --all-sessions -l`; do
  schroot -c $SESSION -e
done

# start the schroot sessions
SESSION1=`schroot -b -c lenny`
SESSION2=`schroot -b -c etch`

# start services in the schroot sessions
schroot -r -c $SESSION1 /etc/init.d/parabuild start
schroot -r -c $SESSION2 /etc/init.d/parabuild start


This starts our build server software (Parabuild in this case) in both
chroots.  This allows us to run builds for different versions of Linux
on the same hardware with zero overhead from virtualization.

You could use the same steps to bring up any type of services you might
need.


On Fri, 2 Oct 2009 01:13:12 -0400
Scott Garman <sgarman at zenlinux.com> wrote:

> Hello,
> 
> At tonight's meeting I mentioned schroot as a friendlier way of
> setting up and using chroot environments. As long as you're working
> with Linux distributions that support network-based installs, this
> tool can be quite handy. I use it to manage chroot versions of Debian
> that I develop in for an embedded project I'm working on.
> 
> The schroot project doesn't have an official web site as far as I
> know, but this tutorial will get you up and running with it:
> 
> http://www.debian-administration.org/articles/566
> 
> This was another article that describes setting up Debian build 
> environments:
> 
> http://www.pseudorandom.co.uk/2007/sbuild/
> 
> Enjoy,
> 
> Scott
> 



More information about the PLUG mailing list