0

Hello again I'm trying to install VirtualBox 6 on a pc Lenovo AllIn in which i would like to run a Vm and since yesterday I'm working around this problem

1 Answer 1

3

Secure Boot Enable

then reading about this

vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: You must sign these kernel modules before using VirtualBox:
  vboxdrv vboxnetflt vboxnetadp vboxpci
See the documenatation for your Linux distribution..
vboxdrv.sh: Building VirtualBox kernel modules.
vboxdrv.sh: failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

There were problems setting up VirtualBox.  To re-start the set-up process, run
  /sbin/vboxconfig
as root.  If your system is using EFI Secure Boot you may need to sign the
kernel modules (vboxdrv, vboxnetflt, vboxnetadp, vboxpci) before you can load
them. Please see your Linux system's documentation for more information.

then i self sign the modules like this

    cd /root/module-signing
    openssl req -new -x509 -newkey rsa:2048 -keyout MOK.priv -outform DER -out MOK.der -nodes -days 36500 -subj "/CN=YOUR_NAME/"
    chmod 600 MOK.priv

and Import the key

mokutil --import /root/module-signing/MOK.der
  input password: type my password
  input password again: type my password

I check the modules like this

 $ for modfile in $(dirname $(modinfo -n vboxdrv))/*.ko; do hexdump -Cv  "$modfile" | tail -n 5 ;done
00dcdc20  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00dcdc30  a8 c9 dc 00 00 00 00 00  6b 02 00 00 00 00 00 00  |........k.......|
00dcdc40  00 00 00 00 00 00 00 00  01 00 00 00 00 00 00 00  |................|
00dcdc50  00 00 00 00 00 00 00 00                           |........|
00dcdc58
00094400  11 00 00 00 03 00 00 00  00 00 00 00 00 00 00 00  |................|
00094410  00 00 00 00 00 00 00 00  c0 36 09 00 00 00 00 00  |.........6......|
00094420  bb 01 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00094430  01 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00094440
00113470  11 00 00 00 03 00 00 00  00 00 00 00 00 00 00 00  |................|
00113480  00 00 00 00 00 00 00 00  b8 27 11 00 00 00 00 00  |.........'......|
00113490  b1 01 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
001134a0  01 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
001134b0
000ddbf0  11 00 00 00 03 00 00 00  00 00 00 00 00 00 00 00  |................|
000ddc00  00 00 00 00 00 00 00 00  38 cf 0d 00 00 00 00 00  |........8.......|
000ddc10  b1 01 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
000ddc20  01 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

and run

$ for modfile in $(dirname $(modinfo -n vboxdrv))/*.ko; do /usr/src/kernels/$(uname -r)/scripts/sign-file sha256 /root/module-signing/MOK.priv /root/module-signing/MOK.der "$modfile" ;done

and check again

$ for modfile in $(dirname $(modinfo -n vboxdrv))/*.ko; do hexdump -Cv  "$modfile" | tail -n 5 ;done
00dcddd0  f2 67 a1 c7 88 5f 39 1e  1f e6 34 65 a1 8f ca 24  |.g..._9...4e...$|
00dcdde0  e4 b2 b6 d0 00 00 02 00  00 00 00 00 00 00 01 8c  |................|
00dcddf0  7e 4d 6f 64 75 6c 65 20  73 69 67 6e 61 74 75 72  |~Module signatur|
00dcde00  65 20 61 70 70 65 6e 64  65 64 7e 0a              |e appended~.|
00dcde0c
000945c0  35 19 99 5f 30 f8 21 51  84 00 6d 17 00 00 02 00  |5.._0.!Q..m.....|
000945d0  00 00 00 00 00 00 01 8c  7e 4d 6f 64 75 6c 65 20  |........~Module |
000945e0  73 69 67 6e 61 74 75 72  65 20 61 70 70 65 6e 64  |signature append|
000945f0  65 64 7e 0a                                       |ed~.|
000945f4
00113630  66 35 23 5c b8 d3 de aa  66 69 45 eb 00 00 02 00  |f5#\....fiE.....|
00113640  00 00 00 00 00 00 01 8c  7e 4d 6f 64 75 6c 65 20  |........~Module |
00113650  73 69 67 6e 61 74 75 72  65 20 61 70 70 65 6e 64  |signature append|
00113660  65 64 7e 0a                                       |ed~.|
00113664
000dddb0  54 45 4e 4e 82 5d 75 5e  ab 97 cd 8d 00 00 02 00  |TENN.]u^........|
000dddc0  00 00 00 00 00 00 01 8c  7e 4d 6f 64 75 6c 65 20  |........~Module |
000dddd0  73 69 67 6e 61 74 75 72  65 20 61 70 70 65 6e 64  |signature append|
000ddde0  65 64 7e 0a                                       |ed~.|
000ddde4

and run

modprobe vboxdrv 

just touse steps works perfect ! :P

1
  • I have done this in Gentoo whit a few adjustment's but it's almost the same !
    – denn0n
    Aug 5 at 19:41

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.