From 9e83f59ea6b6a8b306eaf7400c6604fae4aa37fb Mon Sep 17 00:00:00 2001 From: Garret Raziel Date: Tue, 27 Jan 2015 12:35:04 +0100 Subject: [PATCH] add script for creating virtual disks --- createhdds.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100644 createhdds.sh diff --git a/createhdds.sh b/createhdds.sh new file mode 100644 index 0000000..f638a65 --- /dev/null +++ b/createhdds.sh @@ -0,0 +1,22 @@ +#!/bin/bash +guestfish <<_EOF_ +sparse disk_full.img 10G +run +part-init /dev/sda mbr +part-add /dev/sda p 1 10485760 +part-add /dev/sda p 10485761 -1 +mkfs ext4 /dev/sda1 +mkfs ext4 /dev/sda2 +mount /dev/sda1 / +write /testfile "Hello, world!" +_EOF_ + +guestfish <<_EOF_ +sparse disk_freespace.img 10G +run +part-init /dev/sda mbr +part-add /dev/sda p 1 2097152 +mkfs ext4 /dev/sda1 +mount /dev/sda1 / +write /testfile "Hello, world!" +_EOF_