#! /bin/bash
IMG=`pwd`/qemu-image.img
DIR=`pwd`/mounted_fs
qemu-img create $IMG 1g
sudo mkfs.ext2 $IMG
mkdir $DIR
sudo mount -o loop $IMG $DIR
sudo debootstrap --arch amd64 buster $DIR
sudo umount $DIR
rmdir $DIR