Some problems in Debian Buster
The script works in Debian but I made small modifications
After
parted -s $SDCARD mkpart primary fat32 32M 256M 1> /dev/null 2>&1
I put
sleep 5
because the START var is empty
The qemu-static.conf file is missing in Debian
I put the file from https://aur.archlinux.org/binfmt-qemu-static.git in the /usr/lib/binfmt.d/qemu-static.conf path