debootstrap is a command line tool for creating a minimal Debian-based system. It is used to install a basic Debian system on a target device, without requiring the availability of Debian packages or a network connection. The debootstrap script downloads and installs the necessary packages from a Debian archive, and configures the target system to match a specified release of Debian.
debootstrap Command Examples
1. Create a Debian stable release system inside the `debian-root` directory:
# sudo debootstrap stable /path/to/debian-root/ http://deb.debian.org/debian
2. Create a minimal system including only required packages:
# sudo debootstrap --variant=minbase stable /path/to/debian-root/
3. Create an Ubuntu 20.04 system inside the `focal-root` directory with a local mirror:
# sudo debootstrap focal /path/to/focal-root/ file:///path/to/mirror/
4. Switch to a bootstrapped system:
# sudo chroot /path/to/root
5. List available releases:
# ls /usr/share/debootstrap/scripts/