summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rwxr-xr-xshare/build-scripts/qemu18
1 files changed, 15 insertions, 3 deletions
diff --git a/share/build-scripts/qemu b/share/build-scripts/qemu
index f9ab4b4..4a0540d 100755
--- a/share/build-scripts/qemu
+++ b/share/build-scripts/qemu
@@ -33,7 +33,7 @@ export SCRIPT
Parameters ()
{
- GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,preseed-file:"
+ GETOPT_LONGOPTIONS="bind:,bind-ro:,script:,name:,preseed-file:,boot-method:,"
GETOPT_OPTIONS="b:,s:,n:,p:"
PARAMETERS="$(getopt --longoptions ${GETOPT_LONGOPTIONS} --name=${SCRIPT} --options ${GETOPT_OPTIONS} --shell sh -- "${@}")"
@@ -84,6 +84,11 @@ Parameters ()
shift 2
;;
+ --boot-method)
+ BOOT_METHOD="${2}"
+ shift 2
+ ;;
+
--)
shift 1
break
@@ -128,12 +133,19 @@ then
exit 1
fi
+case "${BOOT_METHOD}" in
+ "")
+ BOOT_METHOD="efi"
+ ;;
+
+ *)
+ ;;
+esac
+
Create_Disk ()
{
# FIXME image size as arg or preseed
IMG_SIZE=12000
- #BOOT_METHOD="bios"
- BOOT_METHOD="efi"
dd if=/dev/zero of="${MACHINES}/${NAME}.img" bs=1024k count=0 seek="${IMG_SIZE}"
parted "${MACHINES}/${NAME}.img" mklabel gpt