From f75f1aa87a6718255e8172ebbafeb0a23c2249c2 Mon Sep 17 00:00:00 2001 From: Mykola Grymalyuk Date: Wed, 8 Dec 2021 09:16:28 -0700 Subject: [PATCH] Ensure boot.efi is copied to root in TUI --- resources/install.py | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/resources/install.py b/resources/install.py index 091ccd9bf..4c0991475 100644 --- a/resources/install.py +++ b/resources/install.py @@ -5,6 +5,7 @@ import plistlib import subprocess import shutil +import os from pathlib import Path from resources import utilities, constants from data import os_data @@ -168,9 +169,13 @@ Please build OpenCore first!""" if (mount_path / Path("System")).exists(): print("- Removing preexisting System folder") shutil.rmtree(mount_path / Path("System"), onerror=rmtree_handler) + if (mount_path / Path("boot.efi")).exists(): + print("- Removing preexisting boot.efi") + os.remove(mount_path / Path("boot.efi")) print("- Copying OpenCore onto EFI partition") shutil.copytree(self.constants.opencore_release_folder / Path("EFI/OC"), mount_path / Path("EFI/OC")) shutil.copytree(self.constants.opencore_release_folder / Path("System"), mount_path / Path("System")) + shutil.copy(self.constants.opencore_release_folder / Path("boot.efi"), mount_path / Path("boot.efi")) if self.constants.boot_efi is True: print("- Converting Bootstrap to BOOTx64.efi") if (mount_path / Path("EFI/BOOT")).exists():