From 589a8f97b2bda1198cff82e9497018e0ca184d25 Mon Sep 17 00:00:00 2001 From: Lars Wirzenius Date: Sat, 29 Feb 2020 09:09:01 +0200 Subject: Add: bootinstalled script to boot VM with UEFI image --- bootinstalled | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) create mode 100755 bootinstalled 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 \ + "$@" -- cgit v1.2.1