Vboxdrv : Key was rejected by service even after enrolling the key

Problem

Hello, i installed virtual-box after enabling the rpm fusion repo. Since i have secure boot enabled on my laptop i enrolled the keys by following this tutorial.

However after completing the enrollment procedure and trying to start the service vboxdrv it gave me this error :

Witch i know is the same error you get when the key isn’t enrolled yet.

Does anyone know why this is happening ?

you need to sign vbox kernel too otherwise it wont load them and blocks and it wont work

Okay any idea how or maybe a link to someone who explains how to do that i’m not very good with this stuff.

in guide they use RSA and time for keys are valid i think you can skip RSA and time validate and use ED higher standard keys

here is guide with out script

and here is method to use akmod-virtualbox it does the job

and lastly official rpm-fusion guide

That tutorial with the screenshot you provided seems misleading. The only key needed to be imported is the one /etc/pki/akmods/certs/public_key.der since its matching key under /etc/pki/akmods/private/ is the one used by akmods to sign the module.

If you installed VBox from rpmfusion as it appears you did then importing the key for booting with secure boot is shown at rpmfusion as well. It parrots the instructions in the file /usr/share/doc/akmods/README.secureboot.

Follow those instructions then run sudo akmods --rebuild --force and the next boot should properly load the vboxdrv module.
If akmods was initially installed during the installation of VirtualBox then first build of the module will not be signed. This is why you use akmods to rebuild the module so it is signed after following those instructions to generate the key and import it into bios.

1 Like

Thank you so much. I did as you suggested and it worked.
I initialy didn’t think it would work as when i did “sudo kmodgenca -a” it told me the key already existed but it kept going and when i did “sudo akmods --rebuild --force” and restarted my computer it just worked.

Thanks to everyone for your time