Recompiling Virtualbox Kernel Module

July 7th, 2008

If after installing a new kernel you may get an error message when you try to start Virtualbox saying something like ‘The vboxdrv kernel module was either not loaded…’. If you then read the logs the solution is actually written there.

Re-setup the kernel module by executing ‘/etc/init.d/vboxdrv setup’ as root.

Sure enough this command fixes the problem and rebuilds the kernel module for the currently running kernel.

# /etc/init.d/vboxdrv setup
Stopping VirtualBox kernel module          [  OK  ]
Recompiling VirtualBox kernel module       [  OK  ]
Starting VirtualBox kernel module          [  OK  ]

16 responses

  1. Luigi comments:

    This is what I get…

    # /etc/init.d/vboxdrv setup
    Stopping VirtualBox kernel module [ OK ]
    Recompiling VirtualBox kernel module [ FAILED ]
    Starting VirtualBox kernel module [ FAILED ]

    Am running Fedora 9 64 on a AMD AM2

  2. linuxFreak comments:

    Hi All, I got the same error . I ‘m running FC9 . I got eh following error msg , Can some one please let me know what is the prob…..I use the following link for installing vbox ,

    http://spoilt.blogsite.org/wordpress/index.php/2008/05/06/how-to-install-virtualbox-on-fedora-8

    Error: sudo /etc/init.d/vboxdrv setup
    Stopping VirtualBox kernel module [ OK ]
    Recompiling VirtualBox kernel module [FAILED]
    (Look at /var/log/vbox-install.log to find out what went wrong)

    Thanks in App.

  3. F0T0N comments:

    In FC9, I uninstall the VirtualBox and then I install it again. I don’t lose any file.

  4. greenish tinted Linux user comments:

    sudo /etc/init.d/vboxdrv setup

    worked form me. AMD Athlon 5000+ 64 Ubuntu Kernel 2.6.27-9-generic

    When I tried previously it said vboxdrv setup could not be found. But it worked today.

    Thanks.

  5. Andyb comments:

    “sudo /etc/init.d/vboxdrv setup ”

    This doesn’t work in Fedora 10. If fails to recompile the VirtualBox kernal module.

  6. Brian comments:

    I have Fedora 10 64 and this work for me. Thanks.

  7. roclan comments:

    On Ubuntu Hardy – after installing 2.6.24-23-generic, my error message said:

    VERR_VM_DRIVER_NOT_INSTALLED (rc=-1908)

    The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Re-setup the kernel module by executing

    ‘/etc/init.d/vboxdrv setup’

    as root. Users of Ubuntu or Fedora should install the DKMS package at first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

    So I installed the DKMS package and then ran

    sudo /etc/init.d/vboxdrv setup

    worked fine!

  8. varis comments:

    Thanks
    sudo /etc/init.d/vboxdrv setup
    worked fine!!!!! werry fine!!!

  9. Milton comments:

    Good tip !!! Really help me :-) Thanks.

    I use Fedora 10 x64,

    I think the other users who had problems does not have the kernel-headers

    As root:

    # yum -y install kernel-headers

  10. Ian comments:

    I upgraded from Ubuntu 8.04 to 8.10 and Virtualbox wouldn’t start. I’ve tried reinstalling it several times but no joy until I renamed the .VirtualBox folder in my home folder and reinstalled. I kept getting the message that it couldn’t convert the XML from version 1.7 (that’s not verbatim…) and suggesting I run /etc/init.d/vboxdrv setup. Problem is when I do that it says setup is not a valid option! The only valid options are start, stop, restart and status. If I try any of the others I get a message saying “No suitable module for running kernel found.” After I reinstalled after renaming .Virtual box it starts but I get the 1908 error also mentioned in this thread. I have DKMS installed, and it was from the start. I would really like to get back my version of Virtualbox I had running under 8.04 as I had installed and used some Windoze programs, and there is some data in there. Any chance of that happening?…

    Thanks,
    Ian

  11. Roachy comments:

    Many thanks – that saved me some effort :)

  12. Barclay comments:

    i keep getting this no matter what!
    “barclay@barclay-laptop:~$ /etc/init.d/vboxdrv setup
    * Stopping VirtualBox kernel module
    *(<–this star is red) Cannot unload module vboxnetadp
    barclay@barclay-laptop:~$ "

    things in () dont appear in kernel just extra info

  13. davidDAE comments:

    The solution that works for me is this:

    #yum install kernel-PAE-devel
    #/etc/init.d/vboxdrv setup

    Fedora 12.

    I hope this can help you.

  14. Rodolfo comments:

    Thanks a lot davidDAE, installing kernel-PAE-devel worked for me.

  15. Alex comments:

    Thanks, kernel-PAE-devel worked always on Fedora 13.

    Stopping VirtualBox kernel module [ OK ]
    Recompiling VirtualBox kernel module [ OK ]
    Starting VirtualBox kernel module [ OK ]

  16. Alex comments:

    Thanks, kernel-PAE-devel worked always on Fedora 13.

Leave a comment