vbox Can't load vboxdrv on 13.1

I don't know the last time I rebooted, but I rebooted today and suddenly VirtualBox stopped working. If I try to manually load vboxdrv I get the error
Code:
KLD vboxdrv.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/modules/vboxdrv.ko - unsupported file type
KLD vboxdrv.ko: depends on kernel - not available or version mismatch
linker_load_file: /boot/modules/vboxdrv.ko - unsupported file type
I'm not sure what I might have changed since the last reboot. I then tried to build it from ports but got the error that I was missing lib32 libs and should cd to /usr/src and run buildlib32 installlib32 but that failed as well, saying it couldn't find legacy.

I suspect if there's a mismatch of the kernel and the package that there would be more complaints, so not sure what exactly is odd on my system.
 
I still don't know the cause but I copied my vboxdrv.ko from another 13.1 install and it's now fine. grahamperrin@ you seem to be the VirtualBox expert, so out of curiosity, do you have any ideas? (If you have time, as mentioned it's fixed.
 
Yep, build and reinstall is sane.

Since you manually copied a file, it may be not too late to tell which package was used (prior to the overwrite):

pkg info -x virtualbox-ose-kmod

<https://www.freshports.org/emulators/virtualbox-ose-kmod/#packages>
<https://www.freshports.org/emulators/virtualbox-ose-kmod/#history>

Relating to virtualbox-ose-kmod-6.1.34_1, which I have here (with FreeBSD 14.0-CURRENT):


From the test plan for the linked review, which began in 2018:

… This came up at BSDCan as the package built on 11.1 panics when loaded on an 11.2 kernel. This just avoids the panic in that case.
 
The result was
Code:
virtualbox-ose-kmod-6.1.34_1
Note that the only thing I replaced was vboxdrv.ko
VirtualBox itself is
Code:
virtualbox-ose-6.1.34
As mentioned, a building from ports failed due to the need for lib32. At this point, I'm just glad I got it working again.

Seems the answer is in a post from 2013 https://forums.freebsd.org/threads/cant-load-vboxdrv-on-13-1.85462/#post-570865
One has to make toolchain before building lib32. I will probably go through this when I get around to it, but for the moment, I'm glad VBox is working for me.
 
Well, I wound up doing the port once I had built the toolchain in /usr/src and all seems to be fine. The port asked me to remove virtualbox-ose-additions saying there would be a conflict, so I removed it, (not additions-kmod), and once the port was built, installed additions with pkg. The pkg info -x for ose-kmod still shows 6.1.34_1 but

Code:
 pkg info -x virtualbox-ose
virtualbox-ose-6.1.34
virtualbox-ose-additions-6.1.34
virtualbox-ose-kmod-6.1.34_1

I hope this is of use to someone. I had figured that once it built from ports all would be ok, but again, it was already ok after I'd copied over the module from another machine.
 
Hi everyone.

I'm having the same problem as described, except I'm not even able to finish the boot process. Here's a picture of my current screen.
T he thing is I don't even need the vbox module anymore... :/

Any help would be great!

Thanks a lot
 

Attachments

  • IMG_20220720_204145.jpg
    IMG_20220720_204145.jpg
    881.2 KB · Views: 175
Hi everyone.

I'm having the same problem as described, except I'm not even able to finish the boot process. Here's a picture of my current screen.
T he thing is I don't even need the vbox module anymore... :/

Any help would be great!

Thanks a lot
So I was able to enter on single user mode and remove the virtualbox-ose package and associated rc.conf configs but it still hangs on the same place without the last warning. Now it freezes on the "loading kernel modules"

Am I missing something or this is totally unrelated to the original post?

Thanks!
 
Back
Top