Differences between revisions 31 and 32
Revision 31 as of 2013-01-09 19:32:02
Size: 3381
Editor: ?skizzhg
Comment:
Revision 32 as of 2013-04-27 22:53:09
Size: 3355
Editor: BobProulx
Comment: wiki formatting
Deletions are marked like this. Additions are marked like this.
Line 14: Line 14:
 aptitude install binutils debootstrap aptitude install binutils debootstrap
Line 19: Line 19:
 mkdir -p /var/chroot/etch mkdir -p /var/chroot/etch
Line 24: Line 24:
 debootstrap --arch i386 etch /var/chroot/etch debootstrap --arch i386 etch /var/chroot/etch
Line 31: Line 31:
  chroot /var/chroot/etch chroot /var/chroot/etch
Line 41: Line 41:
  /etc/passwd
  /etc/groups
/etc/passwd
/etc/groups
Line 47: Line 47:
  /etc/hosts
  /etc/resolv.conf
/etc/hosts
/etc/resolv.conf
Line 53: Line 53:
  /etc/fstab /etc/fstab
Line 61: Line 61:
 proc on /proc type proc (rw)
 sysfs on /sys sysfs kind (rw)
proc on /proc type proc (rw)
sysfs on /sys sysfs kind (rw)
Line 71: Line 71:
 mount --bind /dev/pts /var/chroot/etch/dev/pts mount --bind /dev/pts /var/chroot/etch/dev/pts
Line 97: Line 97:
  apt-get install deborphan apt-get install deborphan
Line 100: Line 100:
  deborphan -a deborphan -a
Line 105: Line 105:
  apt-get remove --purge telnet manpages pppconfig ipchains ... apt-get remove --purge telnet manpages pppconfig ipchains ...
Line 112: Line 112:
  apt-get install emacs21 local mc apt-get install emacs21 local mc

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

Configuration

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.

/etc/passwd
/etc/groups

/etc/hosts
/etc/resolv.conf

/etc/fstab

Mounting pseudo filesystems

/proc

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

/dev/pts

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

deborphan -a

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

Complementary list svgalibg1 whiptail

apt-get install emacs21 local mc

Usage

Common examples of chroot usage:


ToDo - Clean up from French translation.