summaryrefslogtreecommitdiff
path: root/bootinstalled
blob: 55150a922c7aca1510078da0303cf2db1820289f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
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 \
 "$@"