mirror of
https://github.com/oSoWoSo/DistroHopper.git
synced 2024-08-14 22:46:53 +00:00
Refactor EFI/Legacy BIOS logic
This commit is contained in:
parent
2fa3a1319d
commit
f190117a8a
1 changed files with 15 additions and 15 deletions
12
quickemu
12
quickemu
|
@ -164,25 +164,25 @@ function vm_boot() {
|
||||||
boot="efi"
|
boot="efi"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
if [ "${boot}" == "efi" ] || [ "${boot}" == "uefi" ]; then
|
|
||||||
if [ -e "/usr/share/OVMF/OVMF_CODE_4M.fd" ] ; then
|
|
||||||
if [ "${guest_os}" == "macos" ]; then
|
if [ "${guest_os}" == "macos" ]; then
|
||||||
|
echo " - BOOT: EFI"
|
||||||
web_get "https://github.com/kholia/OSX-KVM/raw/master/OpenCore-Catalina/OpenCore.qcow2"
|
web_get "https://github.com/kholia/OSX-KVM/raw/master/OpenCore-Catalina/OpenCore.qcow2"
|
||||||
web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_CODE.fd"
|
web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_CODE.fd"
|
||||||
web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_VARS-1024x768.fd"
|
web_get "https://github.com/kholia/OSX-KVM/raw/master/OVMF_VARS-1024x768.fd"
|
||||||
local EFI_CODE="${VMDIR}/OVMF_CODE.fd"
|
local EFI_CODE="${VMDIR}/OVMF_CODE.fd"
|
||||||
local EFI_VARS="${VMDIR}/OVMF_VARS-1024x768.fd"
|
local EFI_VARS="${VMDIR}/OVMF_VARS-1024x768.fd"
|
||||||
else
|
elif [[ "${boot}" == *"efi"* ]]; then
|
||||||
|
if [ -e "/usr/share/OVMF/OVMF_CODE_4M.fd" ]; then
|
||||||
|
echo " - BOOT: EFI"
|
||||||
local EFI_CODE="/usr/share/OVMF/OVMF_CODE_4M.fd"
|
local EFI_CODE="/usr/share/OVMF/OVMF_CODE_4M.fd"
|
||||||
local EFI_VARS="${VMDIR}/${VMNAME}-vars.fd"
|
local EFI_VARS="${VMDIR}/OVMF_VARS_4M.fd"
|
||||||
if [ ! -e "${EFI_VARS}" ]; then
|
if [ ! -e "${EFI_VARS}" ]; then
|
||||||
cp "/usr/share/OVMF/OVMF_VARS_4M.fd" "${EFI_VARS}"
|
cp "/usr/share/OVMF/OVMF_VARS_4M.fd" "${EFI_VARS}"
|
||||||
fi
|
fi
|
||||||
fi
|
|
||||||
echo " - BOOT: EFI"
|
|
||||||
else
|
else
|
||||||
echo " - BOOT: Legacy BIOS"
|
echo " - BOOT: Legacy BIOS"
|
||||||
echo " - EFI Booting requested but no EFI firmware found."
|
echo " - EFI Booting requested but no EFI firmware found."
|
||||||
|
boot="legacy"
|
||||||
fi
|
fi
|
||||||
else
|
else
|
||||||
echo " - BOOT: Legacy BIOS"
|
echo " - BOOT: Legacy BIOS"
|
||||||
|
|
Loading…
Reference in a new issue