From 187d7378323a23b4dd2bcc23c3107a2c730eb9e3 Mon Sep 17 00:00:00 2001 From: nqvrg <66185596+nqvrg@users.noreply.github.com> Date: Thu, 24 Feb 2022 20:46:43 +0100 Subject: [PATCH] Force qemu to keep booting from cd after formatting disk --- quickemu | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/quickemu b/quickemu index ec32da2..49655d4 100755 --- a/quickemu +++ b/quickemu @@ -933,7 +933,11 @@ function vm_boot() { args+=(-drive media=cdrom,index=1,file="${fixed_iso}") fi - if [ -n "${iso}" ] && [ "${guest_os}" == "kolibrios" ]; then + if [ -n "{iso}" ] && [ "${guest_os}" == "freedos" ]; then + # FreeDOS reboots after partitioning the disk, and QEMU tries to boot from disk after first restart + # This flag sets the boot order to cdrom,disk. It will persist until powering down the VM + args+=(-boot order=dc) + elif [ -n "${iso}" ] && [ "${guest_os}" == "kolibrios" ]; then # Since there is bug (probably) in KolibriOS: cdrom indexes 0 or 1 make system show an extra unexisting iso, so we use index=2 # shellcheck disable=SC2054 args+=(-drive media=cdrom,index=2,file="${iso}")