Translation(s): English - Français - Italiano - Deutsch - Español - Português (Brasil) - Русский - 简体中文
debootstrap installs Debian base systems in a subdirectory of another, already installed system. For the C implementation, see cdebootstrap. For other bootstrapping solutions, see Tools to create a build system. Or if you want to create systems to build packages in, see Package build tools.
debootstrap doesn't require an installation CD, just access to a Debian repository. It can also be installed and run from another operating system - for example, you can use debootstrap to install Debian onto an unused partition from a running Gentoo system. It can also be used to create a rootfs for a machine of a different architecture, which is known as "cross-debootstrapping".
If you want to install DebianTesting or DebianUnstable, download the latest version of debootstrap from the package page and use that. Normally it would not be wise to install a package from unstable onto stable, but debootstrap is really just a shell script and its dependencies are minimal. And since Testing and Unstable change rapidly, the stable version of debootstrap is likely to be missing something.
Documentation
Examples
To locate a mirror near you, see the list of Debian worldwide mirror sites.
To setup a stable system:
main # mkdir /stable-chroot main # debootstrap stable /stable-chroot http://deb.debian.org/debian/
Full process to create a complete Debian installation of sid (unstable):
main # export MY_CHROOT=/sid-root
main # cd /
main # mkdir $MY_CHROOT
main # debootstrap --arch i386 sid $MY_CHROOT http://deb.debian.org/debian/
[ ... watch it download the whole system ]
main # mount proc $MY_CHROOT/proc -t proc
main # mount sysfs $MY_CHROOT/sys -t sysfs
main # cp /etc/hosts $MY_CHROOT/etc/hosts
main # cp /proc/mounts $MY_CHROOT/etc/mtab
main # chroot $MY_CHROOT /bin/bash
chroot # dselect
[ you may use aptitude, install mc and vim ... ]
main # echo "8:23:respawn:/usr/sbin/chroot $MY_CHROOT " \
"/sbin/getty 38400 tty8" >> /etc/inittab
[ define a login tty that will use this system ]
[ i.e. create tty8 with `mknod tty8 c 4 8' and run `passwd' ]
main # init q
[ reload init ]To setup an Ubuntu system from Debian:
main # apt-get ubuntu-keyring # and ubuntu-archive-keyring in buster and earlier main # mkdir /ubuntu_xenial_1604 main # debootstrap --arch=amd64 xenial /ubuntu_xenial_1604 http://archive.ubuntu.com/ubuntu/
Supported suites
To see which suites are supported on your system, do ls /usr/share/debootstrap/scripts/.
See Also
SchrootPackaging - Packages stuck with Schroot
debootstick makes a bootable image from a debootstrap directory
