Update boot.sh

This commit is contained in:
Kroese 2024-02-02 22:14:19 +01:00 committed by GitHub
parent 734b4f99b7
commit 4c0efd4b62
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -40,12 +40,14 @@ DEST="$STORAGE/${BOOT_MODE,,}"
if [ ! -f "$DEST.rom" ]; then
[ ! -f "$AAVMF/$ROM" ] && error "UEFI boot file ($AAVMF/$ROM) not found!" && exit 44
cp "$AAVMF/$ROM" "$DEST.rom"
dd if=/dev/zero "of=$DEST.rom" bs=1M count=64 status=none
dd "if=$AAVMF/$ROM" "of=$DEST.rom" conv=notrunc status=none
fi
if [ ! -f "$DEST.vars" ]; then
[ ! -f "$AAVMF/$VARS" ] && error "UEFI vars file ($AAVMF/$VARS) not found!" && exit 45
cp "$AAVMF/$VARS" "$DEST.vars"
dd if=/dev/zero "of=$DEST.vars" bs=1M count=64 status=none
dd "if=$AAVMF/$VARS" "of=$DEST.vars" conv=notrunc status=none
fi
BOOT_OPTS="$BOOT_OPTS -drive file=$DEST.rom,if=pflash,unit=0,format=raw,readonly=on"