Page 1 of 2

Virtualbox - vboxdrv error

Posted: 14. May 2023, 15:04
by lurker666
Hello, I hope you are all well.

I've been messing around with installing VirtualBox for a while now, but it's not working. I've been reading questions and answers here about it, found two threads, did the steps from both, but I can't install VirtualBox or Kernel. I tried to install the kernel from source but it does nothing, in the end it says "vboxdrv error 2". I tried to install VirtualBox, it says the same thing. Tried to install from terminal, same thing. Tried updating the kernel to see if it works, still no good. It looks simple, I watched a video about it, but it still doesn't work - so it doesn't work.

Can you help me with this? Thanks in advance.

Re: Virtualbox - vboxdrv error

Posted: 15. May 2023, 13:05
by lurker666
The problem is here. As soon as I try to install the Kernel Source, I get this error message. I suspect the solution is simple, I'm just stupid.

./virtualbox-kernel.SlackBuild

<processing_the_files>

After:

=== Building 'vboxdrv' module ===
make[1]: Entering directory '/tmp/SBo/virtualbox-kernel-6.1.34/vboxdrv'
/tmp/SBo/virtualbox-kernel-6.1.34/vboxdrv/Makefile-header.gmk:193: *** Error: unable to find the headers of the Linux kernel to build against (KERN_DIR=/lib/modules/5.15.63/build). Specify KERN_VER=<version> (currently 5.15.63) and run Make again. Stop.
make[1]: Leaving directory '/tmp/SBo/virtualbox-kernel-6.1.34/vboxdrv'
make: *** [Makefile:60: vboxdrv] Error 2

I installed the kernel-source and the kernel-headers, but the problem is same.

Re: Virtualbox - vboxdrv error

Posted: 15. May 2023, 15:31
by gapan
Just download the binary from virtualbox's homepage and use that.

Re: Virtualbox - vboxdrv error

Posted: 16. May 2023, 14:24
by lurker666
gapan wrote: 15. May 2023, 15:31 Just download the binary from virtualbox's homepage and use that.
I have fixed it, installed and started VirtualBox, but it still doesn't work, except that it makes me think it does, but it doesn't. Now it says, quote:
"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."

I run the command and it says "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."

I did the following commands: slapt-get -i kernel-source && slapt-get -i kernel-headers. Both installed, then "lilo -v", then reboot, then same problem. Maybe this Slackware Linux is not for dummies like me.

Whatever.

Re: Virtualbox - vboxdrv error

Posted: 20. May 2023, 09:02
by Papasot
I'm not sure this will help, or maybe you tried this already (as you said you have been reading questions and answers here about VistualBox) but maybe it is worth mentioning VirtualBox has a problem at startup, trying to check for updates. I assume vboxconfig has the same problem as well. So download VB from their website, then try this:

Code: Select all

VBoxManage setextradata global GUI/UpdateDate never
See this for details.

At any rate, I believe it is time to switch to QEMU/virt-manager, as it is a better solution for virtual machines.

Re: Virtualbox - vboxdrv error

Posted: 20. May 2023, 17:04
by lurker666
I did the post and the instructions on it, in fact I started with them first. The error after every variation/try is the fucking "vboxdrv" error. Coupled with errors like "Error: Makefile 60, fakeroot, sh error" and so on. I've tried so many things, the error is always the same. Is it possible that I messed up something during the Salix installation?

Who knows.

Re: Virtualbox - vboxdrv error

Posted: 20. May 2023, 17:07
by lurker666
I also tried to install Qemu from source, but some packages are not found in the installation. I think I'm the only unlucky one with a bug. Anyway, thank you all for replying and tolerating the stupid things I write. :D

Re: Virtualbox - vboxdrv error

Posted: 21. May 2023, 22:30
by lurker666
gapan wrote: 15. May 2023, 15:31 Just download the binary from virtualbox's homepage and use that.
Is there a solution to this problem that we could work out? I'll try to write more and see if we can find a solution.

Since VirtualBox complains about vboxdrv, citing missing kernel headers, I installed it to the current version (5.15.63). I installed more kernel packages, then running lilo gave an error, some kind of "/boot/boot.0300 exists - no boot sector backup copy made." [I don't know what is this] error, which I don't know how to solve. I think I may have messed up something during the partitioning process during the installation, but if I had, it would have been an error on the system. The system worked correctly with encrypted root, home and disk, and I was able to install all packages from source (I learned this on Salix, as well as SlackBuilds), so I don't understand it.

It's possible I should rebuild the system, I just don't know what else to do.

Re: Virtualbox - vboxdrv error

Posted: 22. May 2023, 08:05
by gapan
What do you mean you "installed more kernel packages"?

All you need to do is install the kernel-source package. Make sure it is the same version as the kernel you are actually running.

Go to this page: https://www.virtualbox.org/wiki/Linux_Downloads
Get the file from the "All distributions" link.
Run it with:

Code: Select all

sh ./VirtualBox-...

Re: Virtualbox - vboxdrv error

Posted: 22. May 2023, 13:45
by lurker666
gapan wrote: 22. May 2023, 08:05 What do you mean you "installed more kernel packages"?

All you need to do is install the kernel-source package. Make sure it is the same version as the kernel you are actually running.

Go to this page: https://www.virtualbox.org/wiki/Linux_Downloads
Get the file from the "All distributions" link.
Run it with:

Code: Select all

sh ./VirtualBox-...
I did what you both said, but the mistake is the same. I delete Salix, install an Arch, and then run Salix in VirtualBox there, and as soon as it succeeds, reinstall it as the main system.

Thanks for your help.