diff --git a/mkimage.sh b/mkimage.sh
index f36026dceba57c8d39f8d688f26f1c402a7c6f8e..4356aa85b20c82626075dfcfca9fed6fb46b0adb 100755
--- a/mkimage.sh
+++ b/mkimage.sh
@@ -594,6 +594,12 @@ set -- "$@" \
 # any initramfs generated on the target platform using update-initramfs.
 set -- "$@" --customize-hook='rm "$1/etc/initramfs-tools/scripts/local-premount/reform-firstboot-premount" "$1/etc/initramfs-tools/hooks/reform-firstboot-hook" "$1/etc/initramfs-tools/hooks/reform-mkimage-hook"'
 
+# This should be the last customize hook
+set -- "$@" --extract-hook='mkdir -p "$1"/usr/libexec/qemu-binfmt/'
+set -- "$@" --extract-hook='copy-in /usr/libexec/qemu-binfmt/aarch64-binfmt-P /usr/libexec/qemu-binfmt/'
+set -- "$@" --extract-hook='copy-in /usr/bin/qemu-aarch64-static /usr/bin/'
+set -- "$@" --customize-hook='rm -f "$1/usr/libexec/qemu-binfmt/aarch64-binfmt-P" "$1/usr/bin/qemu-aarch64-static"'
+
 case "$DIST" in
 	testing)
 		set -- "$@" testing