Add missing packages check and assumes to run this script as root. Also we need to create partition table on raw image image before invoking disk mount using qemu-nbd tool.