A bash script designed to make it easier for you to enable UEFI Secure Boot for OpenCore.
- Automated Key Generation: Generates new secure boot keys with user-defined common names.
- Certificate Management: Downloads necessary Microsoft certificates if not present.
- EFI Signing: Signs all
.efifiles in the provided EFI directory using the generated keys. - KeyTool Preparation: Prepares KeyTool for use with the generated keys and provides guidance on its usage.
The script requires the following dependencies:
efitoolssbsigncurlwgetopensslunzippython3
The script will attempt to install any missing dependencies using your system's package manager (apt-get, dnf, or pacman).
Important
In order to sign your EFI files, you must have your EFI folder in the same directory as the script. The script will sign and override all .efi files in this folder.
Note
The Microsoft Certificates and KeyTool is provided in this repository by default. If you do not wish to use these, you can provide your own Microsoft certificates and KeyTool or delete them so they could be downloaded from the internet.
- Clone the repository and run the script:
git clone https://github.com/ryanamay/opencore-secureboot-tool.git cd opencore-secureboot-tool chmod +x ocsb-tool.sh ./ocsb-tool.sh
- Generated keys are stored in the
data/keysdirectory. - Signed EFI files are in your provided
EFIfolder. - Preconfigured KeyTool is in the
data/keytooldirectory.
- GUID: A unique identifier (GUID) is generated during the key creation process and stored in
data/myGUID.txt. - Key Overwriting: Be cautious when generating new keys, as it will overwrite any existing keys in the
data/keysdirectory.
This script is licensed under the Apache License 2.0. See the LICENSE file for details.
OpenCore is licensed under the BSD-3-Clause License. See the OpenCore License for details.
This script is based on the guide and tools from the Matebook-X-Pro-2018 repository, which is licensed under the Apache License 2.0. For more information, visit Matebook-X-Pro-2018 Wiki.