Differences between revisions 25 and 27 (spanning 2 versions)
Revision 25 as of 2012-10-02 17:55:47
Size: 3490
Editor: ?CarlHopkins
Comment: Sync between French and English versions. Rough translation, will need cleanup.
Revision 27 as of 2012-10-20 20:10:42
Size: 3373
Editor: ?MartinLeben
Comment: Fixed additional spaces around slashes.
Deletions are marked like this. Additions are marked like this.
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 35: Line 35:
In general, it is necessary to create / edit key configuration points In general, it is necessary to create/edit key configuration points
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 58: Line 58:
=== / Proc ===
 * Check the chrooted system the presence of / proc if the chroot is not likely to be fully operational. A priori, since version debootstrap Debian / Etch integrates natively mount / proc and / sys
=== /proc ===
 * Check the chrooted system the presence of /proc if the chroot is not likely to be fully operational. A priori, since version debootstrap Debian/Etch integrates natively mount /proc and /sys
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 65: Line 65:
=== / Dev / pts === === /dev/pts ===
Line 67: Line 67:
 * It is also advisable to do a "bind" / dev / pts. This prevents error messages like {{{Must be connected to a terminal}}} or {{{Can not access '/ dev/pts/0': No such file or directory of this type}}} with using the control debpkg: screen.  * It is also advisable to do a "bind" /dev/pts. This prevents error messages like {{{Must be connected to a terminal}}} or {{{Can not access '/dev/pts/0': No such file or directory of this type}}} with using the control debpkg: screen.
Line 71: Line 71:
 mount - bind / dev / pts / var / chroot / etch / dev / pts  mount - bind /dev/pts /var/chroot/etch/dev/pts
Line 79: Line 79:
# 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
# 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
Line 87: Line 87:
# 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)
# 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)

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


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

Basic Installation

Build 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

  aptitude install deborphan

  deborphan-a

  aptitude remove - purge telnet manpages pppconfig ipchains ...

Complementary list svgalibg1 whiptail

  sudo aptitude install emacs21 local mc

Usage

Common examples of chroot usage:


ToDo - Clean up from French translation.