From 4e06b87cfd4a84c90639bdc78c5887081f1c511a Mon Sep 17 00:00:00 2001 From: Eliezer Croitoru Date: Fri, 17 Nov 2023 10:57:10 +0200 Subject: [PATCH] 4 --- README.md | 7 +++++-- debian-disk-from-qcow/Makefile | 6 +++++- ubuntu-disk-from-qcow/Makefile | 18 ++++++++++++++---- 3 files changed, 24 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 20f45cf..8853931 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,9 @@ ### From DISK to QCOW2 image -qemu-img convert -p -f raw -O qcow2 /dev/sda /mnt/images/disk.qcow2 +`qemu-img convert -p -f raw -O qcow2 /dev/sda /mnt/images/disk.qcow2` ### From QCOW2 to raw DISK -qemu-img convert -p -f qcow2 -O raw /mnt/images/disk.qcow2 /dev/sda +`qemu-img convert -p -f qcow2 -O raw /mnt/images/disk.qcow2 /dev/sda` + +### Kali linux live DVD iso +* https://www.kali.org/get-kali/#kali-live diff --git a/debian-disk-from-qcow/Makefile b/debian-disk-from-qcow/Makefile index 3cd14b5..affc3af 100644 --- a/debian-disk-from-qcow/Makefile +++ b/debian-disk-from-qcow/Makefile @@ -1,6 +1,10 @@ -install-dependencies: +stall-dependencies-rhel: dnf install -y wget qemu-img +install-dependencies-kali: + apt update + apt install -y qemu-utils wget parted + download-10-image: wget https://cloud.debian.org/images/cloud/buster/latest/debian-10-generic-amd64.qcow2 -O /tmp/debian-cloudimg-amd64.qcow2 diff --git a/ubuntu-disk-from-qcow/Makefile b/ubuntu-disk-from-qcow/Makefile index 083b9b6..1866f34 100644 --- a/ubuntu-disk-from-qcow/Makefile +++ b/ubuntu-disk-from-qcow/Makefile @@ -1,11 +1,21 @@ -install-dependencies: +stall-dependencies-rhel: dnf install -y wget qemu-img -download-image: - wget https://cloud-images.ubuntu.com/jammy/current/jammy-server-cloudimg-amd64.img -O /tmp/jammy-server-cloudimg-amd64.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/jammy-server-cloudimg-amd64.img /dev/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