Skip to content

Instantly share code, notes, and snippets.

@msheiny
Created October 12, 2015 15:07
Show Gist options
  • Save msheiny/5b735391d45f5b90aab6 to your computer and use it in GitHub Desktop.
Save msheiny/5b735391d45f5b90aab6 to your computer and use it in GitHub Desktop.
Signing VirtualBox kernel module under UEFI Secure Boot
# Ripped from this fine internet helper -- http://gorka.eguileor.com/vbox-vmware-in-secureboot-linux/
# Create key
$ openssl req -new -x509 -newkey rsa:2048 -keyout msheiny.priv -outform DER -out msheiny.der -nodes -days 36500 -subj "/CN=msheiny/"
# Sign vboxdrv
$ sudo /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 ./msheiny.priv ./msheiny.der $(modinfo -n vboxdrv)
# import key
$ sudo mokutil --import msheiny.der
# Reboot and follow prompts to accept key
# verify key installed
$ sudo keyctl list %:.system_keyring
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment