I'm attempting to build an arm64 ubuntu image on an x86-64 ubuntu machine.
My command is:
amrith@amrith-virtual-machine:~/images$ disk-image-create -o u64-arm64 -t qcow2 -a arm64 -x ubuntu
Initially I ran into to an error about 'exec format error'. I found:
https://bugs.launchpad.net/diskimage-builder/+bug/1332458
and installed qemu-user and qemu-user-static. It now fails, but in a different way ... So I guess there's still (or maybe again) something wrong. Complete log file is attached.
+ /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:run_in_target:64 : HOME=/root
+ /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:run_in_target:70 : sudo -E chroot /tmp/dib_build.XMCBrayl/mnt env -u TMPDIR -u VIRTUAL_ENV 'PATH=$PATH:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin' sh -c '/tmp/in_target.d/dib-run-parts /tmp/in_target.d/pre-install.d'
chroot: failed to run command 'env': No such file or directory
++ /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:run_in_target:70 : check_break after-error run_in_target bash
++ /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/common-functions:check_break:123 : egrep -e '(,|^)after-error(,|$)' -q
++ /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/common-functions:check_break:123 : echo ''
+ /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:run_in_target:1 : trap_cleanup
+ /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:trap_cleanup:47 : exitval=127
+ /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:trap_cleanup:48 : cleanup
+ /usr/local/lib/python2.7/dist-packages/diskimage_builder/lib/img-functions:cleanup:53 : dib-block-device umount
> sudo -E chroot /tmp/dib_ build.98HoVIqX/ mnt env
this would probably be the first time it tries to run inside the chroot
the "no such file or directory" is quite possibly a red-herring, I feel like it's more likely to be the interpreter missing...
But can we confirm the "bin/env" binary is there? via a manual poke in the /mnt directory (can check the the downloaded cloud image ... but it must be, it's part of coreutils? unless it's some busybox thing and not there?)