This is an old revision of the document!
qemu-user-static debootstrap binfmt-support
export targetdir=rootfs export distro=stretch mkdir $targetdir
$targetdir
: sudo debootstrap --arch=armhf --foreign $distro $targetdir sudo cp /usr/bin/qemu-arm-static $targetdir/usr/bin sudo cp /etc/resolv.conf $targetdir/etc sudo chroot $targetdir
armhf
architecture (this is why qemu-arm-static
is needed) export distro=stretch export LANG=C /debootstrap/debootstrap --second-stage
cat <<EOT > /etc/apt/sources.list deb http://ftp.ch.debian.org/debian/ $distro main contrib non-free deb-src http://ftp.ch.debian.org/debian/ $distro main contrib non-free deb http://security.debian.org/debian-security $distro/updates main contrib non-free deb-src http://security.debian.org/debian-security $distro/updates main contrib non-free deb http://ftp.ch.debian.org/debian/ $distro-updates main contrib non-free deb-src http://ftp.ch.debian.org/debian/ $distro-updates main contrib non-free EOT
Disable the recommended and suggested packages automatic installation to reduce the root file system size:
cat << EOT > /etc/apt/apt.conf.d/71-no-recommends APT::Install-Recommends "0"; APT::Install-Suggests "0"; EOT
apt update apt install locales dialog dpkg-reconfigure locales apt install openssh-server ntpdate resolvconf sudo less hwinfo ntp tcsh zsh vim