#language en ##For Translators - to have a constantly up to date translation header in you page, you can just add a line like the following (with the comment's character at the start of the line removed) ##<> ##TAG:TRANSLATION-HEADER-START ~-[[DebianWiki/EditorGuide#translation|Translation(s)]]: [[Debootstrap|English]] - [[fr/Debootstrap|Français]] - [[it/Debootstrap|Italiano]] - [[de/Debootstrap|Deutsch]] - [[es/debootstrap|Español]] - [[pt_BR/Debootstrap|Português (Brasil)]] - [[ru/Debootstrap|Русский]] - [[zh_CN/Debootstrap|简体中文]]-~ ##TAG:TRANSLATION-HEADER-END ---- == Introduction == DebianPkg:debootstrap is a tool which will install a Debian base system into a subdirectory of another, already installed system. It doesn't require an installation CD, just access to a Debian [[What_is_a_repository?|repository]]. It can also be installed and run from another operating system, so, for instance, 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". There is also a largely equivalent version written in C: DebianPkg:cdebootstrap, which is smaller. There are [[SystemBuildTools#bootstrap|alternatives]] to debootstrap with additional features such as merging packages from different repositories. If you are interested in setting up a [[chroot]] for building Debian packages, look at DebianPkg:sbuild or the [[SystemBuildTools#Package_build_tools|other available package build tools]]. Since DebianTesting and DebianUnstable change rapidly, if you are going to attempt to install DebianTesting or DebianUnstable, it is recommended that you download the latest version of debootstrap from the [[DebianPkg:debootstrap|package page]] and use that. Normally it would not be wise to install a package from unstable onto stable, but in this case it's safe, since debootstrap is really just a shell script and its dependencies are minimal. == Documentation == {{{#!wiki debian * [[http://www.debian.org/releases/stable/i386/apds03.en.html| Debian GNU/Linux Installation Guide -- Appendix D.3: Installing Debian GNU/Linux from a Unix/Linux System]] * [[DebianMan:8/debootstrap|debootstrap(8)]] manpage }}} == Examples == {i} To locate a mirror near you, see the list of [[http://www.debian.org/mirror/list|Debian worldwide mirror sites]]. To setup a [[DebianStable|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 ([[DebianUnstable|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 # echo "proc $MY_CHROOT/proc proc defaults 0 0" >> /etc/fstab main # mount proc $MY_CHROOT/proc -t proc main # echo "sysfs $MY_CHROOT/sys sysfs defaults 0 0" >> /etc/fstab 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 # mkdir /ubuntu_xenial_1604 main # debootstrap --arch=amd64 xenial /ubuntu_xenial_1604 http://archive.ubuntu.com/ubuntu/ }}} == C implementation of Debootstrap == cdebootstrap is used to create a Debian base system from scratch. See DebianPkg:cdebootstrap cdebootstrap-[[udeb]] is intended for the use in building DebianInstaller images only. Do not install it on a normal Debian system. == Mailing List == DebianList:debian-boot ---- == See Also == * SchrootPackaging - Packages stuck with Schroot * [[Schroot]]