pbuilder and chroot
February 5th, 2010
Build a Chroot with debootstrap, example a Ubuntu lucid
sudo debootstrap lucid /opt/chroots/lucid.linfati.cl/
now, create a /usr/local/bin/go-chroot file with
#/bin/sh case "$1" in sethost) echo virtu-$2 | sudo tee /opt/chroots/$2.linfati.cl/etc/debian_chroot ;; run) sudo pbuilder --execute \ --aptcache "" \ --no-targz \ --buildplace /opt/chroots/$2.linfati.cl \ -- /bin/su - ;; *) $0 sethost $1 $0 run $1 ;; esac exit 0
and run
go-chroot lucid




















Recent Comments