HashiCorp Packer build configuration for Babelbox (Debian Installer Demo) VMs.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

30 lines
292 B

#!/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