I have two kernels installed, 3.5.0 and 3.6.0. For several reasons I have to run kernel 3.5.0. VirtualBox works perfectly on 3.6.0, but not on 3.5.0.
After I booted kernel 3.5.0 I triggered a module rebuild of the with apt-get --reinstall install
virtualbox-dkms. This recompiled the VirtualBox module successfully. However,
it fails to load.
# modprobe vboxdrv
ERROR: could not insert 'vboxdrv': Exec format error
/var/log/messages:
warning: `VirtualBox' uses 32-bit capabilities (legacy support in use)
vboxdrv: disagrees about version of symbol module_layout
The module seems to be installed correctly:
$ ls /lib/modules/3.5.0/updates/dkms/
vboxdrv.ko vboxnetadp.ko vboxnetflt.ko vboxpci.ko
System information: Debian unstable, package virtualbox-dkms is installed
$ uname -r
3.5.0
$ apt-cache show virtualbox | grep Version
Version: 4.1.18-dfsg-1.1
$ apt-cache show dkms | grep Version
Version: 2.2.0.3-1.2
Here is the output of the module build:
-------- Uninstall Beginning --------
Module: virtualbox
Version: 4.1.18
Kernel: 3.5.0 (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
vboxdrv.ko:
- Uninstallation
- Deleting from: /lib/modules/3.5.0/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetadp.ko:
- Uninstallation
- Deleting from: /lib/modules/3.5.0/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetflt.ko:
- Uninstallation
- Deleting from: /lib/modules/3.5.0/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxpci.ko:
- Uninstallation
- Deleting from: /lib/modules/3.5.0/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod....
DKMS: uninstall completed.
-------- Uninstall Beginning --------
Module: virtualbox
Version: 4.1.18
Kernel: 3.6.0 (x86_64)
-------------------------------------
Status: Before uninstall, this module version was ACTIVE on this kernel.
vboxdrv.ko:
- Uninstallation
- Deleting from: /lib/modules/3.6.0/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetadp.ko:
- Uninstallation
- Deleting from: /lib/modules/3.6.0/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxnetflt.ko:
- Uninstallation
- Deleting from: /lib/modules/3.6.0/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
vboxpci.ko:
- Uninstallation
- Deleting from: /lib/modules/3.6.0/updates/dkms/
- Original module
- No original module was found for this module on this kernel.
- Use the dkms install command to reinstall any previous module version.
depmod....
DKMS: uninstall completed.
------------------------------
Deleting module version: 4.1.18
completely from the DKMS tree.
------------------------------
Done.
Unpacking replacement virtualbox-dkms ...
Setting up virtualbox-dkms (4.1.18-dfsg-1.1) ...
Loading new virtualbox-4.1.18 DKMS files...
Building for 3.5.0 and 3.6.0
Building initial module for 3.5.0
Done.
vboxdrv:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.5.0/updates/dkms/
vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.5.0/updates/dkms/
vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.5.0/updates/dkms/
vboxpci.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.5.0/updates/dkms/
depmod....
DKMS: install completed.
Building initial module for 3.6.0
Done.
vboxdrv:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.6.0/updates/dkms/
vboxnetadp.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.6.0/updates/dkms/
vboxnetflt.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.6.0/updates/dkms/
vboxpci.ko:
Running module version sanity check.
- Original module
- No original module exists within this kernel
- Installation
- Installing to /lib/modules/3.6.0/updates/dkms/
depmod....
DKMS: install completed.
[ ok ] Stopping VirtualBox kernel modules.
[FAIL] Starting VirtualBox kernel modules[....] modprobe vboxdrv failed. Please use 'dmesg' to find out why ... failed!
failed!
invoke-rc.d: initscript virtualbox, action "restart" failed.
How can I get VirtualBox to work on 3.5.0?
apt-cache showwill show the highest priority version, which may or may not be the one installed. Useapt-cache policy <package>– jordanm Oct 21 '12 at 21:48linux-headers-3.5.0is installed. Otherwise the modules would not have been built and placed in/var/lib/modules/3.5.0I assume. – Marco Oct 21 '12 at 22:39