Autres langues

Langue: en

Autres versions - même langue

Version: 2009-03-29 (debian - 07/07/09)

Section: 1 (Commandes utilisateur)


em_multistrap - extends debootstrap for multiple repository support


  em_multistrap [-a ARCH] [-d DIR] -f CONFIG_FILE
  em_multistrap -?|-h|--help|--version


(These options can also be set in the configuration file.)

--tidy-up - remove apt cache data, downloaded Packages files and the apt package cache. Same as cleanup=true.

--no-auth - allow the use of unauthenticated repositories. Same as noauth=true


em_multistrap provides a debootstrap-like method based on apt and extended to provide support for multiple repositories, using a configuration file to specify the relevant suites, architecture, extra packages and the mirror to use for each debootstrap.

The aim is to create a complete debootstrap with all packages installed and configured, instead of just the base system.

Example configuration:

  # same as --tidy-up option if set to true
  # same as --no-auth option if set to true
  # keyring packages listed in each debootstrap will
  # still be installed.
  # extract all downloaded archives (default is true)
  # the order of sections is not important.
  # the debootstrap option determines which repository
  # is used to calculate the list of Priority: required packages.

This will result in a completely normal debootstrap of Debian lenny from the specified mirror, for armel in '/opt/multistrap/'.

Specify a package to extend the multistrap to include that package and all dependencies.

Specify more debootstraps by adding new sections. Section names are used in the debootstrap general option.

Section names are case-insensitive.

e.g. change




then add the new section for Grip:


Setting Grip instead of Debian in the debootstrap option, as above, will provide a base system from Emdebian Grip 1.0 and locate any missing dependencies in Debian 5.0 Lenny, allowing you to add any package(s) you need from Debian that are not yet in Emdebian Grip.

All dependencies are resolved only by apt, using all configured repositories, to use only the most recent and most suitable dependencies. Note that multistrap turns off Install-Recommends so if the multistrap needs a package that is only a Recommended dependency, the recommended package needs to be specified in the packages line explicitly.

'Architecture' and 'directory' can be overridden on the command line. Other general options have command line options, except debootstrap itself.

General settings:

'directory' specifies the top level directory where the debootstrap will be created - it is not packed into a .tgz once complete.

As with debootstrap, em_multistrap will continue after errors.

em_multistrap does not currently implement the machine:variant support used in Emdebian but the build directory is not packed up at the end of the run so other scripts can be used to implement customisations.

Secure Apt

To use authenticated apt repositories, multistrap either needs to be able to install an appropriate keyring package from the existing apt sources *outside the multistrap environment* or have the relevant keys already configured using apt-key *on the host system*.

If relevant packages exist, specify them in the 'keyring' option for each repository. em_multistrap will then check that apt has already installed this package so that the repository can be authenticated before any packages are downloaded from it.

Note that *all* repositories to be used with multistrap must be authenticated or apt will fail. Similarly, secure apt can only be disabled for all repositories (by using the --no-auth command line option or setting the general noauth option in the configuration file), even if only one repository does not have a suitable keyring available. Not all packages need keyring packages, if you configure apt-key appropriately.

The keyring package(s) will also be installed inside the multistrap environment to match the installed apt sources for the multistrap.

All configuration of apt-key needs to be done for the machine running multistrap itself.


multistrap is stateless - if the directory exists, it will simply proceed as normal and apt will try to pick up where it left off.

Native mode - multistrap

em_multistrap was not intended for native support, it was developed for cross architecture support. In order for multiple repositories to be used, em_multistrap only unpacks the packages selected by apt.

In native mode, various post-multistrap operations are likely to be needed that debootstrap would do for you:

  1. copy /etc/hosts into the chroot
  2. clean the environment to unset LANGUAGE, LC_ALL and LANG
     to silence nuisance perl warnings that obscure other errors

(An alternative to unset the localisation variables is to add locales to your multistrap configuration file in the 'packages' option.

Eventually, multistrap will either replace em_multistrap or call em_multistrap with --arch and take over native duties.