From a9cfc6fa0e3cbefcfdbd2665d99ae6b9582b8c52 Mon Sep 17 00:00:00 2001 From: Jim Paris Date: Tue, 28 Jun 2016 11:48:35 -0400 Subject: [PATCH] Fix qemu config so we can write to sector 0 --- run.sh | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/run.sh b/run.sh index 8f5d264..2a161a0 100755 --- a/run.sh +++ b/run.sh @@ -45,17 +45,21 @@ esac set -e set -x +cfg="" case $boot in c) echo "booting CD with empty disk" rm -f ${DISK} dd if=/dev/zero "of=${DISK}" bs=1M count=0 seek=10240 - cfg="-cdrom ${iso} -hda ${DISK} -boot d" + cfg+=" -drive file=${iso},index=1,media=cdrom" + cfg+=" -drive file=${DISK},index=0,media=disk,format=raw" + cfg+=" -boot d" ;; d) echo "booting disk with no CD" - cfg="-hda ${DISK} -boot c" + cfg+=" -drive file=${DISK},index=0,media=disk,format=raw" + cfg+=" -boot c" ;; esac -qemu-system-x86_64 -enable-kvm -m 1024 -vga vmware $cfg +qemu-system-x86_64 -enable-kvm -m 1024 -vga virtio $cfg