From db5bff2a4b052ef5d4d987b5b35cd660a435ec6c Mon Sep 17 00:00:00 2001 From: Michael Kirkedal Thomsen Date: Wed, 2 Nov 2016 17:30:44 +0100 Subject: [PATCH] Right order in run_script: creating the boot loading settings _before_ using it. --- run_qemu.sh | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/run_qemu.sh b/run_qemu.sh index 32675fa..5414ac7 100755 --- a/run_qemu.sh +++ b/run_qemu.sh @@ -11,6 +11,7 @@ set -euo pipefail iso_path=./qemu/kudos.iso kudos_disk_path=./store.file kudos_path=./kudos/kudos-x86_64 +grub_set_path=./qemu/grub/iso/boot/grub/grub.cfg if [ -f "$iso_path" ]; then rm "$iso_path" @@ -18,11 +19,9 @@ fi cp -f "$kudos_path" "./qemu/grub/iso/boot/kudos-x86_64" -grub-mkrescue -o "$iso_path" "./qemu/grub/iso" - -rm qemu/grub/iso/boot/grub/grub.cfg - -touch qemu/grub/iso/boot/grub/grub.cfg +if [ -f "$grub_set_path" ]; then + rm "$grub_set_path" +fi echo "set timeout=0 set default=0 # Set the default menu entry @@ -32,6 +31,8 @@ menuentry \"kudos\" { boot }" >> ./qemu/grub/iso/boot/grub/grub.cfg +grub-mkrescue -o "$iso_path" "./qemu/grub/iso" + qemu-system-x86_64 \ -gdb tcp::1234 \ -monitor stdio `# non graphical mode` \