Debian Chroot

Introduction
I often use chroots for testing, compiling software and debian packages. This is a quick run through of the process I use.

LVM
This is not mandatory but if your using LVM you might like to place the chroot a separate volume.

lvcreate -n chroot -L 60G VGNAME mkfs.ext4 /dev/mapper/ VGNAME -chroot mkdir /chroot mount /dev/mapper/ VGNAME -chroot /chroot

Create Chroot Directory
mkdir /chroot

Debootstrap
Install debootstrap

apt-get install binutils debootstrap

Bootstrap a debian install

debootstrap wheezy /chroot/wheezy http://mirror.internode.on.net/pub/debian

Enter the Chroot

chroot /chroot/wheezy /bin/bash

Configure Locales
apt-get install locales dpkg-reconfigure locales

Apt Sources
Review and add/remove sources as desired.

Resources
Debian Wiki Chroot