Differences between revisions 29 and 30
Revision 29 as of 2012-10-21 17:07:49
Size: 3378
Editor: Calinou
Revision 30 as of 2012-10-30 03:50:03
Size: 3379
Editor: CraigHesling
Deletions are marked like this. Additions are marked like this.
Line 19: Line 19:
 mkdir-p /var/chroot/etch  mkdir -p /var/chroot/etch

Translation(s): Deutsch - English - Français - Italiano - Español

chroot on Unix-like operating systems is an operation that changes the apparent root directory for the current running process and its children.(Read more ...)

Basic Installation

Building a "chroot" is very easy in Debian.

You will need:

 aptitude install binutils debootstrap

 mkdir -p /var/chroot/etch

 debootstrap - arch i386 etch /var/chroot/etch

  chroot /var/chroot/etch


In general, it is necessary to create/edit key configuration points

Configuring a chroot is relatively static and very specific, it may be possible to dispense with the command "top-level" and directly edit files.




Mounting pseudo filesystems


 proc on /proc type proc (rw)
 sysfs on /sys sysfs kind (rw)


In this case, the primary system, run the command:

 mount --bind /dev/pts /var/chroot/etch/dev/pts

Default Configurations

Generally the file /etc/fstab might look like this:

# cat /etc/fstab | grep chroot
/dev /var/chroot/etch/dev auto bind 0 0
/dev/pts /var/chroot/etch/dev/pts auto bind 0 0
/proc /var/chroot/etch/proc auto bind 0 0

Therefore mount on the primary system would be:

# mount | grep chroot
/dev on /var/chroot/etch/dev -type none (rw, bind)
/dev/pts on /var/chroot/etch/dev/pts kind none (rw, bind)
/proc on /var/chroot/etch/proc type none (rw, bind)

Adding / removing packages

  apt-get install deborphan


  apt-get remove - purge telnet manpages pppconfig ipchains ...

Complementary list svgalibg1 whiptail

  sudo apt-get install emacs21 local mc


Common examples of chroot usage:

ToDo - Clean up from French translation.