Created
May 22, 2018 16:35
-
-
Save TheLeftMoose/5976846cc106d71cd109acec53e6d4b0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
# This script signs the vbox modules in case you need to run vbox under uefi | |
#1. Create signing keys | |
openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=vbox-mok-enrol-xxx/" | |
echo "1. Signing key created" | |
#2. Sign the modules | |
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxpci) | |
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxnetflt) | |
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxnetadp) | |
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vboxdrv) | |
echo "2. Modules signed" | |
#3. Register the keys to Secure Boot | |
sudo mokutil --import MOK.der | |
echo "3. Keys registered" | |
echo "4. Please reboot, chose -> Enroll MOK-> insert password -> reboot" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment