Need to boot Fedora without UEFI secure boot? (VirtualBox)

I want to install VirtualBox on my Fedora 34 but when I want to start the install, it says:

Kernel driver not installed (rc=-1908)

The VirtualBox Linux kernel driver is either not loaded or not set up correctly. Please try setting it up again by executing

‘/sbin/vboxconfig’

as root.

If your system has EFI Secure Boot enabled you may also 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.

where: suplibOsInit what: 3 VERR_VM_DRIVER_NOT_INSTALLED (-1908) - The support driver is not installed. On linux, open returned ENOENT.

I typed in sudo /sbin/vboxconfig and got this:

vboxdrv.sh: Stopping VirtualBox services.
vboxdrv.sh: Starting VirtualBox services.
vboxdrv.sh: You must sign these kernel modules before using VirtualBox:
  vboxdrv vboxnetflt vboxnetadp
See the documentation for your Linux distribution..
vboxdrv.sh: Building VirtualBox kernel modules.
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-5.11.12-300.fc34.x86_64
This system is currently not set up to build kernel modules.
Please install the Linux kernel "header" files matching the current kernel
for adding new hardware support to the system.
The distribution packages containing the headers are probably:
    kernel-devel kernel-devel-5.11.12-300.fc34.x86_64

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.

So, can I just disable UEFI boot and it will work? I am kinda scared to disable it because I think it has a reason it is on by default. But I also think if I only use it for this command (as VirtualBox is a legit company) and enable it again afterwards, there is no risk.

What do you think about it?

Because I have no clue how to sign the kernel modules. If you think it would be the better way, I am very thankful for advice on how to do it.

Thank you! :slight_smile:

Signing kernel modules is a little bit complicated. Best solution for you is to just disable secure boot. It functions is to make sure any malware isn’t loaded on boot but it’s not something that really needs to be turned on. You’re better off just not clicking and installing suspicious software. When you install a system or program always verify the image signature and you’ll be fine.
If you however want to keep secure boot on you can also install KVM/QEMU. Virt-manager is a GUI frontend for KVM and it’s really simple, works very will and it’s easy to install. Just follow the guide from Fedora docs

1 Like

From where did you get the virtualbox install?

I installed it on fedora 34, fully updated with kernel 5.13.13 with no errors or missing dependencies by downloading it from Downloads – Oracle VM VirtualBox then selecting the linux distributions link and chose the fedora 33 - 34 link and it gave me an rpm that installed with no hitches.

I notice you are not using an rpm so doubt you have the right package. Also note that it is complaining about kernel 5.11.12 which is about the first release kernel of fedora 34.

1 Like

@computersavvy
Hi, I got it from the same source as you. I also chose Linux distributions and Fedora 34.

Would you recommend to try the /sbin/vboxconfig command with UEFI disabled?

(Thanks for the answer in the other thread as well, but for now I would like to try VirtualBox).

You may have gotten it from the same source, but did you install it from the rpm?

Also, you seem to not be reading the error message. It explicitly says you must install the kernel-devel package. I would suggest you also install the kernel-headers package because it is asking about headers.

It also tells you that you must have secure boot disabled. That is done in the bios. Secure boot is why it is asking for signed modules.

It also is saying something about the 5.11.12 kernel and you should update fully before you try the config of VB so you have the newer kernel.

I already had the 5.12.9 or later kernel, had secure boot disabled, and had the kernel packages already installed. Thus when I set it up it never asked for signing modules nor for the kernel-devel nor kernel-headers packages since I already had both those installed.

Any time you are installing something that comes from out-of-tree sources you have to carefully read the error messages and do what it tells you in order to have a successful install and configuration of the software.

Hi, I am currently trying to install it again.
I’m not sure what you mean by “installing it from the rpm”.
I am trying to use the following guide:

As it says in the first step, I used

sudo dnf install binutils gcc make patch libgomp dkms qt5-qtx11extras libxkbcommon
sudo dnf install glibc-headers glibc-devel kernel-headers kernel-devel compat-libvpx5

And my kernel seems to be the current one. uname -r says

5.13.16-200.fc34.x86_64

However, I have to indicate directory where the kernel source is in and I’m not sure how to find out where it is. In the guide, it’s at /usr/src/kernels/
Do you know how I can find it out? I need it for the next command in step 2.

PS: If you wouldn’t recommend this guide, please correct me. I’m not sure if this is the way you described as “installing it from the rpm”.

To install the rpm you simply download the fedora 34 rpm from Oracle (the link I posted above). You then (from the directory where that rpm was saved) run

sudo dnf install VirtualBox-6.1-6.1.26........rpm

using the full file name that you downloaded.

There is nothing else needed to do the install with the rpm. If it complains about missing packages add the needed ones to that command line.

As computersavvy posted you can just install the rpm or you can install and enable the repo then use dnf to install virtualbox.I’ve never worried about the usr/src/kernels and have not had any issues.

Update
If you wish to use VB with less hassle and already configured for you.

Install (if not already installed) the rpmfusion repos as shown here, then simply install virtualbox from there. It is already configured for you and is the latest release.

sudo dnf install virtualbox*

Disable the repo you installed following that guide before you install virtualbox from rpmfusion to avoid possible conflicts.

sudo dnf config-manager --disable virtualbox

Once you have virtualbox installed from the rpmfusion repo you can start it from the menu icon.

Yes I absolutely agree use KVM for native performance in linux environment or use VMware, VMware more smooth or less error than virtual box.

In the guide it is at

/usr/src/kernels/`uname -r`  

There is a distinct difference.

I still recommend the rpmfusion repo source though since that preconfigures it for you.

Hi, thank you very much. I have already managed to install it in a slightly different way, but it was successful. I also managed to launch a VM (Whonix), but there my problem is that the WiFi does not work.
Maybe you have some advice for me:

Thank you!

It is default for the host to access the wifi and the guest to use a virtual wired interface to the host (which then can share the wifi). Configuring the guest to access the wifi device directly will mean the host no longer can access it.

It may be possible to create a bridge interface to the wifi that the guest can use.

Okay, can you tell me how this could work? I am thankful for the advice but for me as a noob it is sometimes hard to execute the instructions.
It’s just weird that everyone says the default settings actually work and I don’t have to adjust anything. But it just doesn’t work. Whenever I open my browser, it has no internet connection. The connnection on the host is fine, though.

If you can fix this with me, I’ll give you some Monero if you like. I don’t want to waste your time for free.

If you want to use the network in the guest you need to set the network in virtualbox to bridged.

So I have to switch from NAT to ‘Bridged Adapter’? What is the NAT for then? Because I have always read that NAT is fine.

I have used NAT, but it has always seemed cleaner and more reliable to simply use the default configured bridge adapter in bridge mode.

I install, selecting bridged and specifying virbr0 as the adapter and it has always worked cleanly for me. Both in VirtualBox and in VMM/QEMU.

What I see as the difference is that in bridged mode I have access from the host to the guest via the network bridge. With NAT it is not the same. Nat seems to allow outside access but not in both directions.

Thanks! Do you think the bridged mode is faster? And is both equally secure and private?