disk-from-cloud-image/ubuntu-disk-from-qcow/Makefile

25 lines
773 B
Makefile
Raw Normal View History

2023-11-26 21:03:45 +02:00
all:
echo OK
install-dependencies-rhel:
2023-11-14 21:52:09 +02:00
dnf install -y wget qemu-img
2023-11-17 10:57:10 +02:00
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
2023-11-14 21:52:09 +02:00
write-image-to-sda:
2023-11-17 10:57:10 +02:00
qemu-img convert -p -f qcow2 -O raw /tmp/ubuntu-server-cloudimg-amd64.img /dev/sda
2023-11-14 21:52:09 +02:00
fix-gpt:
/bin/sh fix-gpt-free-space.sh