the most minimal Debian/sid installed with debootstrap?
I use the option --variant=minbase
which seems to be fairly minimal (about 150MB).
No text editor, but essential GNU tools, package manager, and networking functionnalities with iproute2.
Since the container images are widely available nowadays, the minimal installation can be achieved from a container image. For example, the aarch64 debian stretch docker container installation is only 57.3M. That is way smaller than the debootstrap minbase variant.
Detailed info follows.
Run the following on a PC to get the debian stretch container image in a tar'ed directory.
docker pull arm64v8/debian:stretch-2020-0130-slim
docker save -o stretch-root.tar arm64v8/debian:stretch-2020-0130-slim
Extract the stretch-root.tar, and the installation directory is inside in a file named layer.tar
. Place the content from this file onto an aarch64 target, the directory tree size returned by a du -sh
is 57.3M.
Start a mount and pid namesapce with root to this container image directory. Or alternatively run a chroot on this image directory, that should work but I've not tried.
There is a glitch with me though. In the namesapce, apt-get update
will keep waiting for headers. Somehow it cold be resolved by adding the sandbox user root to the command so the command will become apt-get -o APT::Sandbox::User=root update
. The stretch aarch64 version does not complain about the problem, but it did by the stretch arm32v5 version, so the answer can easily be found on the internet.
Install the debootstrap package inside the container. Run the following to install two debian buster installations:
debootstrap --include=apt,bash,dpkg buster /root/buster-root-1/
debootstrap --variant=minbase buster /root/buster-root-2/
The sizes, returned by a du -sh
on the two installations are respectively 266.4M and 308.1M.