MKCHROOT(1)

NAME
mkchroot, addchroot - Create chroot-able tree using hard links where possible

SYNOPSIS
mkchroot directory
addchroot directory package [...]

DESCRIPTION
mkchroot creates a file structure under (possibly new) directory such that chroot directory /bin/sh will give a shell prompt with directory as /. The shell will have access to the following packages (but see ENVIRONMENT VARIABLES below)
    aaa_elflibs
    glibc-solibs
    bash
    coreutils
    grep
and a usable /dev which is the intersection of the entries in package devs and those in the system /dev directory.

To use the least disk space, directory should be in the same file system as that in which the packages were installed. If this is not possible (e.g. due to installing to multiple partitions), it is usually optimal to have directory in the same file system as /usr. See MKCHROOT_IGNORE_LN_ERRORS below.

addchroot installs package to directory by hard linking or copying the files in the package.
addchroot also runs the install script for package, if it exists in /var/log/scripts.

ENVIRONMENT VARIABLES
Environment variables manage the detailed operation of the addchroot command family.

MKCHROOT_FOR_GCC
    If set, mkchroot will install glibc instead of glibc-solibs.

MKCHROOT_IGNORE_LN_ERRORS
    If set, mkchroot and addchroot will suppress errors from ln failing to create hard links.
    If the errors are "Invalid cross-device link", it is safe to ignore them. However the resultant file system tree will use a lot more space than with hard linking.
    There will be a large number of these errors if directory is not in the same file system as that in which the packages are installed.

VERBOSE_ADDCHROOT
    If set, mkchroot (and hence addchroot) will report each package as it commences installation.

AUTHOR
Written by Duncan Roe