Enrolling MOK certificate with dkms and virtualbox-dkms (Virtualbox with secure boot enabled)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgO9GURib1T8z7lCwjOGLQaGtrueEthgQ8LO42ZX8cOfTqDK4jvDDpKkLFwf2J49kYCMNW7d4ABih_XCb_2UXdq5fPJDkoyg7-8g_YfRUot-XnaXkNYycsNp7lA5_TW9td0FFpLQ2APzKcZ/s1600/1.jpg)
![Creative The name of the picture](https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYQ0N5W1qAOxLP7t7iOM6O6AzbZnkXUy16s7P_CWfOb5UbTQY_aDsc727chyphenhyphen5W4IppVNernMMQeaUFTB_rFzAd95_CDt-tnwN-nBx6JyUp2duGjPaL5-VgNO41AVsA_vu30EJcipdDG409/s400/Clash+Royale+CLAN+TAG%2523URR8PPP.png)
up vote
0
down vote
favorite
As many others, I need to run a Windows instance from Virtualbox, don't want to disable Secure Boot, and therefore have problems in making Virtualbox work after kernel updates.
I have already run through the necessary steps, but something must have gone wrong. At present, Virtualbox runs if I disable secure boot, but freezes the whole system as soon as I try to run a VM (which at the moment is in an interrupted state) when secure boot is enabled.
I checked the following:
- I have generated a certificate (with
-subj "/CN=MyName/"
). AMOK.der
is there, and I enrolled it (mokutil --list-enrolled
shows it with another from Canonical). In fact if I try anothermokutil -n import MOK.der
, I get the outputSKIP: MOK.der is already enrolled
I am able to sign virtualbox modules by this script:
<!-- language: bash -->
#!/bin/bash
for modfile in $(dirname $(modinfo -n vboxdrv))/vbox*.ko; do
echo "Signing $modfile"
/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256
/root/module-signing/MOK.priv
/root/module-signing/MOK.der "$modfile"
done... and I can check that they are all signed:
$ grep "MyName" $(dirname $(modinfo -n vboxdrv))/vbox*.ko
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxdrv.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxnetadp.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxnetflt.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxpci.ko corrispondeIn fact I can load the modules from command line, with no error messages:
$ for modfile in $(dirname $(modinfo -n vboxdrv))/vbox*.ko; do modprobe $(basename -s .ko $modfile); doneNevertheless, I can't find my certificate among those known at BIOS level: None of
mokutil --pk
,mokutil --kek
,mokutil --db
, includes "MyName" in the output (but some of them include "Canonical")
So, the questions:
- Where is the enrolled MOK stored if not in the PK, DB, or KEK? (in fact the modules can be loaded). Which name should I search for in my BIOS utility?
- What is the shim?
- I have
dkms
package installed, and only recently installed alsovirtualbox-dkms
. Are these packages needed or not? In which sequence should I install them? before or after the above procedure? Or should they rather do the whole of it, instead of leaving it to be done by me manually? - Should I rather try uninstalling
virtualbox
,dkms
,virtualbox-dkms
(etc?) and redo the procedure from scratch? What of the above remains applicable fopr the rest of the modules in the
/lib/modules/4.13.0-37-generic/updates/dkms
directory (namelybbswitch
andnvidia*
)? In fact, from the System Settings menu, under System/Software & Updates I see that the Nvidia 384.111 proprietary driver is being used, but then I can neither see it bylsmod | grep nvidia
normodprobe
it:$ modprobe nvidia_384
modprobe: ERROR: could not insert 'nvidia_384': Required key not available
Is the situation inconsistent? Where to start from to fix it?
Thanks
virtualbox secure-boot dkms
add a comment |Â
up vote
0
down vote
favorite
As many others, I need to run a Windows instance from Virtualbox, don't want to disable Secure Boot, and therefore have problems in making Virtualbox work after kernel updates.
I have already run through the necessary steps, but something must have gone wrong. At present, Virtualbox runs if I disable secure boot, but freezes the whole system as soon as I try to run a VM (which at the moment is in an interrupted state) when secure boot is enabled.
I checked the following:
- I have generated a certificate (with
-subj "/CN=MyName/"
). AMOK.der
is there, and I enrolled it (mokutil --list-enrolled
shows it with another from Canonical). In fact if I try anothermokutil -n import MOK.der
, I get the outputSKIP: MOK.der is already enrolled
I am able to sign virtualbox modules by this script:
<!-- language: bash -->
#!/bin/bash
for modfile in $(dirname $(modinfo -n vboxdrv))/vbox*.ko; do
echo "Signing $modfile"
/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256
/root/module-signing/MOK.priv
/root/module-signing/MOK.der "$modfile"
done... and I can check that they are all signed:
$ grep "MyName" $(dirname $(modinfo -n vboxdrv))/vbox*.ko
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxdrv.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxnetadp.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxnetflt.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxpci.ko corrispondeIn fact I can load the modules from command line, with no error messages:
$ for modfile in $(dirname $(modinfo -n vboxdrv))/vbox*.ko; do modprobe $(basename -s .ko $modfile); doneNevertheless, I can't find my certificate among those known at BIOS level: None of
mokutil --pk
,mokutil --kek
,mokutil --db
, includes "MyName" in the output (but some of them include "Canonical")
So, the questions:
- Where is the enrolled MOK stored if not in the PK, DB, or KEK? (in fact the modules can be loaded). Which name should I search for in my BIOS utility?
- What is the shim?
- I have
dkms
package installed, and only recently installed alsovirtualbox-dkms
. Are these packages needed or not? In which sequence should I install them? before or after the above procedure? Or should they rather do the whole of it, instead of leaving it to be done by me manually? - Should I rather try uninstalling
virtualbox
,dkms
,virtualbox-dkms
(etc?) and redo the procedure from scratch? What of the above remains applicable fopr the rest of the modules in the
/lib/modules/4.13.0-37-generic/updates/dkms
directory (namelybbswitch
andnvidia*
)? In fact, from the System Settings menu, under System/Software & Updates I see that the Nvidia 384.111 proprietary driver is being used, but then I can neither see it bylsmod | grep nvidia
normodprobe
it:$ modprobe nvidia_384
modprobe: ERROR: could not insert 'nvidia_384': Required key not available
Is the situation inconsistent? Where to start from to fix it?
Thanks
virtualbox secure-boot dkms
btw, I now discovered thatsbin/vboxconfig
makes modules and saves them in/var/lib/dkms/
, while all instructions and code snippets will do the signing in/lib/modules/4.13.0-37-generic/updates/dkms/
, and the two are not symlinked... Am I signing the right modules?
â lurix66
Mar 19 at 16:33
... and..., what should I check about consistency of version of packages, as I have virtualbox-5.2, dkms, virtualbox-dkms, etc? How to get back to a fresh install?
â lurix66
Mar 19 at 16:36
add a comment |Â
up vote
0
down vote
favorite
up vote
0
down vote
favorite
As many others, I need to run a Windows instance from Virtualbox, don't want to disable Secure Boot, and therefore have problems in making Virtualbox work after kernel updates.
I have already run through the necessary steps, but something must have gone wrong. At present, Virtualbox runs if I disable secure boot, but freezes the whole system as soon as I try to run a VM (which at the moment is in an interrupted state) when secure boot is enabled.
I checked the following:
- I have generated a certificate (with
-subj "/CN=MyName/"
). AMOK.der
is there, and I enrolled it (mokutil --list-enrolled
shows it with another from Canonical). In fact if I try anothermokutil -n import MOK.der
, I get the outputSKIP: MOK.der is already enrolled
I am able to sign virtualbox modules by this script:
<!-- language: bash -->
#!/bin/bash
for modfile in $(dirname $(modinfo -n vboxdrv))/vbox*.ko; do
echo "Signing $modfile"
/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256
/root/module-signing/MOK.priv
/root/module-signing/MOK.der "$modfile"
done... and I can check that they are all signed:
$ grep "MyName" $(dirname $(modinfo -n vboxdrv))/vbox*.ko
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxdrv.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxnetadp.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxnetflt.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxpci.ko corrispondeIn fact I can load the modules from command line, with no error messages:
$ for modfile in $(dirname $(modinfo -n vboxdrv))/vbox*.ko; do modprobe $(basename -s .ko $modfile); doneNevertheless, I can't find my certificate among those known at BIOS level: None of
mokutil --pk
,mokutil --kek
,mokutil --db
, includes "MyName" in the output (but some of them include "Canonical")
So, the questions:
- Where is the enrolled MOK stored if not in the PK, DB, or KEK? (in fact the modules can be loaded). Which name should I search for in my BIOS utility?
- What is the shim?
- I have
dkms
package installed, and only recently installed alsovirtualbox-dkms
. Are these packages needed or not? In which sequence should I install them? before or after the above procedure? Or should they rather do the whole of it, instead of leaving it to be done by me manually? - Should I rather try uninstalling
virtualbox
,dkms
,virtualbox-dkms
(etc?) and redo the procedure from scratch? What of the above remains applicable fopr the rest of the modules in the
/lib/modules/4.13.0-37-generic/updates/dkms
directory (namelybbswitch
andnvidia*
)? In fact, from the System Settings menu, under System/Software & Updates I see that the Nvidia 384.111 proprietary driver is being used, but then I can neither see it bylsmod | grep nvidia
normodprobe
it:$ modprobe nvidia_384
modprobe: ERROR: could not insert 'nvidia_384': Required key not available
Is the situation inconsistent? Where to start from to fix it?
Thanks
virtualbox secure-boot dkms
As many others, I need to run a Windows instance from Virtualbox, don't want to disable Secure Boot, and therefore have problems in making Virtualbox work after kernel updates.
I have already run through the necessary steps, but something must have gone wrong. At present, Virtualbox runs if I disable secure boot, but freezes the whole system as soon as I try to run a VM (which at the moment is in an interrupted state) when secure boot is enabled.
I checked the following:
- I have generated a certificate (with
-subj "/CN=MyName/"
). AMOK.der
is there, and I enrolled it (mokutil --list-enrolled
shows it with another from Canonical). In fact if I try anothermokutil -n import MOK.der
, I get the outputSKIP: MOK.der is already enrolled
I am able to sign virtualbox modules by this script:
<!-- language: bash -->
#!/bin/bash
for modfile in $(dirname $(modinfo -n vboxdrv))/vbox*.ko; do
echo "Signing $modfile"
/usr/src/linux-headers-$(uname -r)/scripts/sign-file sha256
/root/module-signing/MOK.priv
/root/module-signing/MOK.der "$modfile"
done... and I can check that they are all signed:
$ grep "MyName" $(dirname $(modinfo -n vboxdrv))/vbox*.ko
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxdrv.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxnetadp.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxnetflt.ko corrisponde
Il file binario /lib/modules/4.13.0-37-generic/updates/dkms/vboxpci.ko corrispondeIn fact I can load the modules from command line, with no error messages:
$ for modfile in $(dirname $(modinfo -n vboxdrv))/vbox*.ko; do modprobe $(basename -s .ko $modfile); doneNevertheless, I can't find my certificate among those known at BIOS level: None of
mokutil --pk
,mokutil --kek
,mokutil --db
, includes "MyName" in the output (but some of them include "Canonical")
So, the questions:
- Where is the enrolled MOK stored if not in the PK, DB, or KEK? (in fact the modules can be loaded). Which name should I search for in my BIOS utility?
- What is the shim?
- I have
dkms
package installed, and only recently installed alsovirtualbox-dkms
. Are these packages needed or not? In which sequence should I install them? before or after the above procedure? Or should they rather do the whole of it, instead of leaving it to be done by me manually? - Should I rather try uninstalling
virtualbox
,dkms
,virtualbox-dkms
(etc?) and redo the procedure from scratch? What of the above remains applicable fopr the rest of the modules in the
/lib/modules/4.13.0-37-generic/updates/dkms
directory (namelybbswitch
andnvidia*
)? In fact, from the System Settings menu, under System/Software & Updates I see that the Nvidia 384.111 proprietary driver is being used, but then I can neither see it bylsmod | grep nvidia
normodprobe
it:$ modprobe nvidia_384
modprobe: ERROR: could not insert 'nvidia_384': Required key not available
Is the situation inconsistent? Where to start from to fix it?
Thanks
virtualbox secure-boot dkms
virtualbox secure-boot dkms
edited Mar 19 at 15:45
asked Mar 19 at 15:29
lurix66
1133
1133
btw, I now discovered thatsbin/vboxconfig
makes modules and saves them in/var/lib/dkms/
, while all instructions and code snippets will do the signing in/lib/modules/4.13.0-37-generic/updates/dkms/
, and the two are not symlinked... Am I signing the right modules?
â lurix66
Mar 19 at 16:33
... and..., what should I check about consistency of version of packages, as I have virtualbox-5.2, dkms, virtualbox-dkms, etc? How to get back to a fresh install?
â lurix66
Mar 19 at 16:36
add a comment |Â
btw, I now discovered thatsbin/vboxconfig
makes modules and saves them in/var/lib/dkms/
, while all instructions and code snippets will do the signing in/lib/modules/4.13.0-37-generic/updates/dkms/
, and the two are not symlinked... Am I signing the right modules?
â lurix66
Mar 19 at 16:33
... and..., what should I check about consistency of version of packages, as I have virtualbox-5.2, dkms, virtualbox-dkms, etc? How to get back to a fresh install?
â lurix66
Mar 19 at 16:36
btw, I now discovered that
sbin/vboxconfig
makes modules and saves them in /var/lib/dkms/
, while all instructions and code snippets will do the signing in /lib/modules/4.13.0-37-generic/updates/dkms/
, and the two are not symlinked... Am I signing the right modules?â lurix66
Mar 19 at 16:33
btw, I now discovered that
sbin/vboxconfig
makes modules and saves them in /var/lib/dkms/
, while all instructions and code snippets will do the signing in /lib/modules/4.13.0-37-generic/updates/dkms/
, and the two are not symlinked... Am I signing the right modules?â lurix66
Mar 19 at 16:33
... and..., what should I check about consistency of version of packages, as I have virtualbox-5.2, dkms, virtualbox-dkms, etc? How to get back to a fresh install?
â lurix66
Mar 19 at 16:36
... and..., what should I check about consistency of version of packages, as I have virtualbox-5.2, dkms, virtualbox-dkms, etc? How to get back to a fresh install?
â lurix66
Mar 19 at 16:36
add a comment |Â
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
active
oldest
votes
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
StackExchange.ready(
function ()
StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1017338%2fenrolling-mok-certificate-with-dkms-and-virtualbox-dkms-virtualbox-with-secure%23new-answer', 'question_page');
);
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Post as a guest
Sign up or log in
StackExchange.ready(function ()
StackExchange.helpers.onClickDraftSave('#login-link');
var $window = $(window),
onScroll = function(e)
var $elem = $('.new-login-left'),
docViewTop = $window.scrollTop(),
docViewBottom = docViewTop + $window.height(),
elemTop = $elem.offset().top,
elemBottom = elemTop + $elem.height();
if ((docViewTop elemBottom))
StackExchange.using('gps', function() StackExchange.gps.track('embedded_signup_form.view', location: 'question_page' ); );
$window.unbind('scroll', onScroll);
;
$window.on('scroll', onScroll);
);
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
Sign up using Google
Sign up using Facebook
Sign up using Email and Password
btw, I now discovered that
sbin/vboxconfig
makes modules and saves them in/var/lib/dkms/
, while all instructions and code snippets will do the signing in/lib/modules/4.13.0-37-generic/updates/dkms/
, and the two are not symlinked... Am I signing the right modules?â lurix66
Mar 19 at 16:33
... and..., what should I check about consistency of version of packages, as I have virtualbox-5.2, dkms, virtualbox-dkms, etc? How to get back to a fresh install?
â lurix66
Mar 19 at 16:36