Page 1 of 1

Rebuilding kernel module failed on VirtualBox 5.2

Posted: 13. Oct 2020, 02:05
by tfmeier
I'm trying to install VirtualBox 5.2 on Fedora 30.

I ran the following commands

Code: Select all

dnf update
dnf install @development-tools
dnf install kernel-devel kernel-headers dkms qt5-qtx11extras  elfutils-libelf-devel zlib-devel
dnf install VirtualBox-5.2
Rebuild kernel modules with following command

Code: Select all

## Fedora 32/31/30/29 and CentOS/RHEL 8/7 ##
/usr/lib/virtualbox/vboxdrv.sh setup
At this point I get the following error (note that VirtualBox has not been started yet)
failed: modprobe vboxdrv failed. Please use 'dmesg' to find out why.

Output of 'dmesg' as follows

Any idea why this failed?

Re: Rebuilding kernel module failed on VirtualBox 5.2

Posted: 13. Oct 2020, 17:18
by fth0
I can't give you an overly specific answer (you have to Google that yourself). But the error message says that "unsigned module loading is restricted" and also tells you where to start investigating "man kernel_lockdown.7". So that tells me that you should research the signing of kernel modules for your host OS.

Re: Rebuilding kernel module failed on VirtualBox 5.2

Posted: 14. Oct 2020, 00:51
by tfmeier
fth0 wrote:I can't give you an overly specific answer (you have to Google that yourself). But the error message says that "unsigned module loading is restricted" and also tells you where to start investigating "man kernel_lockdown.7". So that tells me that you should research the signing of kernel modules for your host OS.
Thanks incidentally I just found a workaround for this. The BIOS was set to Secure Boot Enabled. Upon disabling Secure Boot I was able to rebuild the kernel. So all good now.

Re: Rebuilding kernel module failed on VirtualBox 5.2

Posted: 14. Oct 2020, 23:03
by fth0
Yes, that's a valid workaround. With Secure Boot disabled, you don't have to sign kernel modules. Thanks for reporting back!