Debian Chroot

From Bit Binary Wiki
Revision as of 11:35, 30 September 2013 by Jelloir (Talk | contribs)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search



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

Note: Replace highlighted text with your options


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
Tip: You can optionally add this to /etc/fstab

Create Chroot Directory

Note: If you used LVM then you can skip this section
mkdir /chroot


Install debootstrap

apt-get install binutils debootstrap

Bootstrap a debian install

debootstrap wheezy /chroot/wheezy

Enter the Chroot

chroot /chroot/wheezy /bin/bash

Configure the Chroot

Configure Locales

apt-get install locales
dpkg-reconfigure locales

Apt Sources

Review /etc/apt/sources.list and add/remove sources as desired.


Debian Wiki Chroot

Personal tools