-
-
Save opoet7/4f00b17c7fc5d7a3fc793bdc169868ef to your computer and use it in GitHub Desktop.
Self sign the required modules, vmmon and vmnet, for VMWARE to work with SecureBoot on, Ubuntu 17
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/sh | |
#Asking for sudo because the script needs it almost all the time | |
sudo echo -n | |
#Creating the key used to sign the two modules | |
echo 'Preparing vmware key...' | |
openssl req -new -x509 -newkey rsa:2048 -keyout VMWAREKEY.priv -outform DER -out VMWAREKEY.der -nodes -days 36500 -subj "/CN=VMware/" | |
#Sign the modules | |
echo 'Signing Virtual machine monitor...' | |
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./VMWAREKEY.priv ./VMWAREKEY.der $(modinfo -n vmmon) | |
echo 'Signing Virtual ethernet...' | |
sudo /usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256 ./VMWAREKEY.priv ./VMWAREKEY.der $(modinfo -n vmnet) | |
#Import the key, it will ask you to set a password. You need to reboot for changes to take effect | |
echo 'Importing key...' | |
echo 'Set a password to use after reboot' | |
sudo mokutil --import VMWAREKEY.der | |
RED='\033[0;31m' | |
printf "${RED}### You need to reboot for the changes to take effect. \n${RED}### Use the password you entered above to import the key. \n" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment