[Solved] vboxdrv kernel module doesn't start at boot

Discussions related to using VirtualBox on Linux hosts.
Post Reply
iMBeCil
Posts: 2
Joined: 28. Nov 2012, 15:08

[Solved] vboxdrv kernel module doesn't start at boot

Post by iMBeCil »

Sorry if this is duplicate of post with title 'Vboxdrv not installed? ' (but it doesn't seems to be the case ...)

Host: CrunchBang Waldorf (= Debian Wheezy), 32 bit, 2 CPU, 4GB mem
VirtualBox: 4.2.4, installed as suggested on web site, via

Code: Select all

$sudo apt-get install virtualbox-4.2
Guest: any

Symptoms:
1. can't start virtual machine (from CLI or GUI)

2. can start VirtualBox GUI, but when I try to start one of VM, errors pop up ("Kernel driver not installed (rc=-1908)") with suggestion:
execute

Code: Select all

/etc/init.d/vboxdrv setup
3. executing

Code: Select all

$ dmesg | grep vboxdrv
produces no output

4. after execution of the

Code: Select all

$ sudo modprobe vboxdrv
I can start virtual machine (from both CLI and GUI). Note: I did not execute suggestion above, '/etc/init.d/vboxdrv setup'.

5. file '/etc/defaults/virtualbox' exists, and there is a line inside:

Code: Select all

LOAD_VBOXDRV_MODULE=1
(as it should be).

Conclusion: VirtualBox works as expected, except 'vboxdrv' kernel module is not loaded at computer startup.
Last edited by iMBeCil on 28. Nov 2012, 15:55, edited 1 time in total.
iMBeCil
Posts: 2
Joined: 28. Nov 2012, 15:08

Re: vboxdrv kernel module doesn't start at boot

Post by iMBeCil »

Ok, I have found the fix ....

Edit file as 'su':

Code: Select all

$ sudo nano /etc/init.d/virtualbox
find line with

Code: Select all

test -d /usr/share/doc/virtualbox -a -x /usr/bin/VBoxHeadless || exit 0
(line 31) and change it to

Code: Select all

test -d /usr/share/doc/virtualbox-4.2 -a -x /usr/bin/VBoxHeadless || exit 0
Now, 'vboxdrv' kernel module is loaded during computer startup.

Explanation: apparently, '/etc/init.d/virtualbox' tests whether it is installed or not, by above 'test' line. It tests for the directory at wrong(?) place: instead in '/usr/share/doc/virtualbox' it is in '/usr/share/doc/virtualbox-4.2'.

Note: I have no idea if this is a bug in VirtualBox installation script, or if this is characteristics of Debian wheezy, CrunchBang distro, or my particular configuration.
JDR
Posts: 1
Joined: 4. Jan 2013, 19:10

Re: [Solved] vboxdrv kernel module doesn't start at boot

Post by JDR »

Thanks very much for posting the fix. I had the exact same issue on the exact same OS and have been loading the module manually for months every time I rebooted.
Post Reply