Rebuilding kernel module failed on VirtualBox 5.2

Discussions related to using VirtualBox on Linux hosts.
Post Reply
tfmeier
Posts: 20
Joined: 4. Oct 2020, 10:20

Rebuilding kernel module failed on VirtualBox 5.2

Post 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?
Attachments
Kernel rebuild error.gif
Kernel rebuild error.gif (100.45 KiB) Viewed 2227 times
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Rebuilding kernel module failed on VirtualBox 5.2

Post 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.
tfmeier
Posts: 20
Joined: 4. Oct 2020, 10:20

Re: Rebuilding kernel module failed on VirtualBox 5.2

Post 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.
fth0
Volunteer
Posts: 5690
Joined: 14. Feb 2019, 03:06
Primary OS: Mac OS X other
VBox Version: VirtualBox+Oracle ExtPack
Guest OSses: Linux, Windows 10, ...
Location: Germany

Re: Rebuilding kernel module failed on VirtualBox 5.2

Post by fth0 »

Yes, that's a valid workaround. With Secure Boot disabled, you don't have to sign kernel modules. Thanks for reporting back!
Post Reply