Hi - I'm using debootstrap to create a fresh new chroot, and it fails
immediately:
root:~# /usr/sbin/debootstrap --variant=buildd buster /var/chroot/buster-amd64
E: Unable to execute target architecture
root:~# cat /var/chroot/buster-amd64/debootstrap/debootstrap.log
amd64: not supported on this machine/kernel
root:~#
In this example, the directory /var/chroot/buster-amd64 did not previously
exist.
The problem appears to be at the arch-test stage (line 637 of
/usr/sbin/debootstreap), where it runs 'arch-test -c "$TARGET" "$ARCH"'
to see if the host and target architectures are compatible. AFAICT,
when given a chroot via -c, arch-test looks for its test files *inside*
the chroot; however, at this stage debootstrap has not yet done any
unpacking (or even any downloads), which means the chroot is empty.
This maks arch-test fail, even though the host and target architecture
are identical, and in turn this makes debootstrap fail before it has a
chance to do any real work.
If I comment out the arch-test stage at line 632 (i.e., skipping the
arch-test block entirely) then debootstrap runs successfully to completion.
Thanks - Ben.