Main menu:


Please consider a small donation:



Or you can donate bitcoin:


Thanks to TekLinks in Birmingham, AL, for providing colocation and bandwidth.

Page Rank


FOSS Force Best Blog--2013 Award

Recent posts

Recent comments

About this blog

I am Eric Hameleers, and this is where I think out loud.
More about me.


Subscribe to Blog via Email

Enter your email address to subscribe to this blog and receive notifications of new posts by email.

Join 425 other subscribers

My Favourites



April 2019
« Mar    

RSS Alien's Slackware packages

RSS Alien's unofficial KDE Slackware packages

RSS Alien's multilib packages

RSS Slackware64-current



Compiling a new kernel module for VirtualBox

I had installed VirtualBox a while ago on my laptop running my Slackware64 test environment, so I could experiment with the program a bit. Then I forgot all about it.

Today, I upgraded to the latest set of slackware64-current packages, including the new kernel and when I rebooted to that new kernel, I saw an error message scrolling by stating that “the vboxdrv kernel modules failed to load”. Of course… a new kernel needs all external modules to be recompiled.

When installing VirtualBox, I had already noticed that the installer is Slackware friendly; it installed a nice “/etc/rc.d/rc.vboxdrv” boot script and updated the “rc.local” script so that it runs “rc.vboxdrv” on boot. Well done!

It is easy to rebuild the missing VirtualBox kernel modules using that rc script: you just need to run it once with the “setup” parameter.

root@alienteepee:~# /etc/rc.d/rc.vboxdrv setup
Stopping VirtualBox kernel module ...done.
Recompiling VirtualBox kernel module ...done.
Starting VirtualBox kernel module ...done.

That’s all there is to it!

Cheers, Eric


Comment from simkazell
Posted: January 31, 2010 at 16:40

Thank =) I not yet update

Comment from simkazell
Posted: January 31, 2010 at 17:11

Oh, this is in any case would be broken.
I thought that everything worked. Maybe someone did it while I was sleeping

Comment from gargamel
Posted: February 2, 2010 at 03:25

Yeah, VirtualBox is not only an excellent piece of software, the developers also provide superb support. A while ago the scripts were written for System V and derivatives. As I didn’t manage to get VBox running smoothly, I posted some question in the newsgroup. Not only did the developers offer a helping hand to get the whole package installed on my computer — they also added support for Slackware to their scripts almost immediately!

Great product, friendly people, impressive support — that’s about what I think about Innotek. I hope It’s not getting worse now, due to the Oracel#


Comment from escaflown
Posted: February 2, 2010 at 06:31

Good info to have. Lat time, I recompiled it from sources 🙂

Comment from Willy Sudiarto Raharjo
Posted: February 5, 2010 at 01:01

I wish VMware would be that easy. I tried to run VMWare workstation 6 on 2.6.32 and it failed. My student tried VMWare 7 on 2.6.32 and it failed too on virtual networking.

Comment from Frank
Posted: February 18, 2010 at 11:04

The current SlackBuild on SBo disables the setup feature of the rc.vboxdrv init script. (the actual virtualbox-ose SlackBuild) The comment in the script says “We don’t want a init script building kernel modules”. Since you posted this I am assuming it’s safe to enable this feature, or is there a reason it is disabled by default that we should be aware of?

Comment from alienbob
Posted: February 18, 2010 at 13:08

Hi Frank,
This is the policy for scripts that are hosted there – they should be foolproof.
But there is nothing against changing the scripts (like rc.vboxdrv) if you are an experienced Slacker. After all, the command “rc.vboxdrv setup” is never going to be executed on boot. You, the admin, are expected to run it. To me it is only beneficial that the script has this ability.


Comment from Theo
Posted: June 11, 2010 at 02:41

Doesn’t work with VB 3.2.4 on my Slack13.1 box :[

it tells me to look at dmesg. which tells me
warning: VirtualBox’ uses 32-bit capabilities (legacy support in use)

Pingback from [SOLVED] VirtualBox Kernel Driver Missing after Update?
Posted: December 25, 2012 at 19:29

[…] the same issue but fixed it with the help of AlienBob's entry in his blog a while ago. Here the URL. Hope it can help others. […]

Pingback from Virtualbox 重新编译内核模块 | Mark Wallace's Home Page
Posted: March 17, 2013 at 21:25

[…] Compiling a new kernel module for VirtualBox […]

Comment from Fabby
Posted: December 5, 2014 at 14:14

And 3 years after you posted this, you helped me do the same on Ubuntu 14.04.1 (but the script is located in /etc/init.d) and we’re running 4.3.20 now… Try doing that under Windows! 😉


Write a comment