Installing Virtual Box and VMWare in linux with secure boot enabled

Virtual Box

Following are the commands that you need to follow, I found the solution here.

These steps will create a public private key pair (1)

  • sudo -i
  • mkdir /root/module-signing
  • cd /root/module-signing
  • openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj “/CN=username/”
  • in the above command if your username is temp you write the command as: openssl req -new x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj “/CN=temp/”
  • chmod 600 MOK.priv

Import the public key (2)

  • mokutil –import /root/module-signing/MOK.der
  • sudo init 6 – this command will restart the device

Now you will be asked for the password that you want to set and this is the password that you will write down after the rebooting the system. When rebooting, you will be asked to enroll MOK, select enroll and you will be asked to enter the password that you set using the previous command.


Here I got the error for vmmon and vmnet, to fix that issue, in addition to above commands, we need to use the following command (I got them here):

  • sudo su or sudo -i
  • cd /root/module-signing
  • /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmmon)
  • /usr/src/linux-headers-`uname -r`/scripts/sign-file sha256 ./MOK.priv ./MOK.der $(modinfo -n vmnet)

Leave a Reply

Your email address will not be published. Required fields are marked *