babelbox-packer/scripts/babelbox-partitions.sh
Jan Dittberner c7ee084eb8 Add qemu builder
This commit adds support for QEMU
2020-03-01 22:54:32 +01:00

30 lines
292 B
Bash

#!/bin/sh
set -e
case "$PACKER_BUILDER_TYPE" in
virtualbox-iso)
DEVICE=/dev/sda
;;
qemu)
DEVICE=/dev/vda
;;
*)
echo "Unsupported packer build $PACKER_BUILDER_TYPE" >&2
exit 1
esac
echo "
d
3
n
e
3
+3G
n
p
w" | /sbin/fdisk "$DEVICE" || true
/sbin/partprobe