Update boot.sh

This commit is contained in:
Kroese 2025-10-21 19:48:45 +02:00 committed by GitHub
parent ba7fb05342
commit 13d44e6204
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -51,12 +51,14 @@ if [ ! -s "$DEST.rom" ] || [ ! -f "$DEST.rom" ]; then
/run/utk.bin "$OVMF/$ROM" replace_ffs LogoDXE "/var/www/img/${PROCESS,,}.ffs" save "$DEST.tmp"
fi
mv "$DEST.tmp" "$DEST.rom"
! setOwner "$DEST.rom" && error "Failed to set the owner for \"$DEST.rom\" !"
fi
if [ ! -s "$DEST.vars" ] || [ ! -f "$DEST.vars" ]; then
[ ! -s "$OVMF/$VARS" ] || [ ! -f "$OVMF/$VARS" ]&& error "UEFI vars file ($OVMF/$VARS) not found!" && exit 45
cp "$OVMF/$VARS" "$DEST.tmp"
mv "$DEST.tmp" "$DEST.vars"
! setOwner "$DEST.vars" && error "Failed to set the owner for \"$DEST.vars\" !"
fi
BOOT_OPTS+=" -drive if=pflash,format=raw,readonly=on,file=$DEST.rom"
@ -158,6 +160,8 @@ if [ ! -f "$IMG" ]; then
fi
! setOwner "$IMG" && error "Failed to set the owner for \"$IMG\" !"
BOOT_DRIVE_ID="OpenCore"
DISK_OPTS+=" -device virtio-blk-pci,drive=${BOOT_DRIVE_ID},bus=pcie.0,addr=0x5,bootindex=$BOOT_INDEX"