From: Ralph Ronnquist Date: Sun, 5 Nov 2023 11:31:51 +0000 (+1100) Subject: Minor generalisation to allow testing ventoy use cases. X-Git-Url: https://git.rrq.au/?a=commitdiff_plain;h=b94399bd48eaa7b022bf031279c9543c10487bcd;p=rrq%2Ftiniest.git Minor generalisation to allow testing ventoy use cases. --- diff --git a/vm.sh b/vm.sh index 5d8b79c..452b475 100755 --- a/vm.sh +++ b/vm.sh @@ -2,6 +2,8 @@ # # QEMU setup for trial VM +ISO=${ISO:-tiniest.iso} + N="12345678" if [ ${#1} = 1 ] && [ "${N#*$1}" != "$N" ] ; then REPLY=$1 @@ -9,12 +11,12 @@ else VARIANT=( "use bootimage.raw as harddisk with legacy boot (and boot menu)" "use bootimage.raw as harddisk with UEFI boot" - "use tiniest.iso as harddisk with legacy boot (and boot menu)" - "use tiniest.iso as harddisk with UEFI boot" - "use tiniest.iso as cdrom with legacy boot (and boot menu)" - "use tiniest.iso as cdrom with UEFI boot" - "use tiniest.iso as USB disk with legacy boot (and boot menu)" - "use tiniest.iso as USB disk with UEFI boot" + "use ${ISO} as harddisk with legacy boot (and boot menu)" + "use ${ISO} as harddisk with UEFI boot" + "use ${ISO} as cdrom with legacy boot (and boot menu)" + "use ${ISO} as cdrom with UEFI boot" + "use ${ISO} as USB disk with legacy boot (and boot menu)" + "use ${ISO} as USB disk with UEFI boot" ) select V in "${VARIANT[@]}" ; do @@ -24,7 +26,7 @@ fi [ -z "$REPLY" ] && exit 0 FILE=bootimage.raw -[ $REPLY -ge 3 ] && FILE=tiniest.iso +[ $REPLY -ge 3 ] && FILE=${ISO} MEDIA=disk [ $REPLY -ge 5 ] && MEDIA=cdrom [ $REPLY -ge 7 ] && MEDIA=usb @@ -70,4 +72,6 @@ ARGS=( ) echo "${ARGS[*]}" | sed "s/ -/\n -/g" -exec qemu-system-x86_64 ${ARGS[@]} +qemu-system-x86_64 ${ARGS[@]} +tput reset # EFI boot messes up the terminal +