Browse Source

Fix qemu config so we can write to sector 0

tags/nilmbuntu-5
Jim Paris 4 years ago
parent
commit
a9cfc6fa0e
1 changed files with 7 additions and 3 deletions
  1. +7
    -3
      run.sh

+ 7
- 3
run.sh View File

@@ -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

Loading…
Cancel
Save