summaryrefslogtreecommitdiff
path: root/bootinstalled
diff options
context:
space:
mode:
Diffstat (limited to 'bootinstalled')
-rwxr-xr-xbootinstalled22
1 files changed, 22 insertions, 0 deletions
diff --git a/bootinstalled b/bootinstalled
new file mode 100755
index 0000000..55150a9
--- /dev/null
+++ b/bootinstalled
@@ -0,0 +1,22 @@
+#!/bin/sh
+#
+# Based on: https://wiki.debian.org/SecureBoot/VirtualMachine
+
+set -eu
+
+main="$1"
+shift 1
+
+if ! [ -e OVFM_VARS.fd ]
+then
+ cp /usr/share/OVMF/OVMF_VARS.fd .
+fi
+
+sudo chown liw:liw "$main"
+kvm \
+ -m 2048 \
+ --machine pc-q35-2.5 \
+ -drive if=pflash,format=raw,readonly,file=/usr/share/OVMF/OVMF_CODE.fd \
+ -drive if=pflash,format=raw,file=./OVMF_VARS.fd \
+ -drive file="$main",format=raw,index=0,media=disk \
+ "$@"