Skip to content

A bash script designed to make it easier for you to enable UEFI Secure Boot for OpenCore.

License

Notifications You must be signed in to change notification settings

ryawaa/opencore-secureboot-tool

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

OpenCore SecureBoot Tool

A bash script designed to make it easier for you to enable UEFI Secure Boot for OpenCore.

Features

  • 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 .efi files 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.

Prerequisites

The script requires the following dependencies:

  • efitools
  • sbsign
  • curl
  • wget
  • openssl
  • unzip
  • python3

The script will attempt to install any missing dependencies using your system's package manager (apt-get, dnf, or pacman).

Usage

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

Outputs

  • Generated keys are stored in the data/keys directory.
  • Signed EFI files are in your provided EFI folder.
  • Preconfigured KeyTool is in the data/keytool directory.

Notes

  • 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/keys directory.

License

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.

Credits

About

A bash script designed to make it easier for you to enable UEFI Secure Boot for OpenCore.

Topics

Resources

License

Stars

Watchers

Forks

Languages