stall-dependencies-rhel:
	dnf install -y wget qemu-img

install-dependencies-kali:
	apt update
	apt install -y qemu-utils wget parted
	
download-ubuntu-2204-image:
	wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img -O /tmp/ubuntu-server-cloudimg-amd64.img

download-ubuntu-2004-image:
	wget https://cloud-images.ubuntu.com/focal/current/focal-server-cloudimg-amd64-disk-kvm.img -O /tmp/ubuntu-server-cloudimg-amd64.img
	
download-ubuntu-1804-image:	
	wget https://cloud-images.ubuntu.com/bionic/current/bionic-server-cloudimg-amd64.img -O /tmp/ubuntu-server-cloudimg-amd64.img

write-image-to-sda:
	qemu-img convert -p -f qcow2 -O raw /tmp/ubuntu-server-cloudimg-amd64.img /dev/sda

fix-gpt:
	/bin/sh fix-gpt-free-space.sh
