summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorSimon Spöhel <simon@spoehel.ch>2021-04-22 09:20:32 +0000
committerSakirnth Nagarasa <sakirnth@gmail.com>2021-09-01 08:24:59 +0000
commitcd6d3b18f8e921307e10666c8434541f1a3ddc8c (patch)
treed57e727b19b41f432aaca03c7709cddfd9462b93
parentFstab fixup for efi. (diff)
downloadcompute-tools-cd6d3b18f8e921307e10666c8434541f1a3ddc8c.tar.xz
compute-tools-cd6d3b18f8e921307e10666c8434541f1a3ddc8c.zip
Creating option for images booting efi or legacy bios.
Diffstat (limited to '')
-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