2011-11-19 // VirtualBox 4.1.6 on Fedora 15 with Kernel 2.6.41.1: module compilation error
Some userspace programs got problems with the 2.6.x→3.x kernel numbering transition. To prevent the need to fix everything at once, the Fedora developers decided to ship 3.x kernels as 2.6.4x on Fedora 15 Lovelock and use the correct numbering scheme on Fedora releases ≥16 Verne.
This kernel version numbering hack makes some problems with the current VirtualBox 4.1.6 on Fedora 15: /etc/init.d/vboxdrv setup
exits with an error (/var/log/vbox-install.log
says that recompiling VBoxPci-linux.o
failed). The reason is simple: A check thinks that the running kernel 2.6.41.1 is older than 3.1. Therefore the wrong header file gets included (asm/amd_iommu.h
instead of linux/amd-iommu.h
).
Quick fix to get your VirtualBox working again:
- Open the belonging source code file as root:
$ su - $ gedit /var/lib/dkms/vboxhost/4.1.6/source/vboxpci/linux/VBoxPci-linux.c
- Search for
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0) # include <asm/amd_iommu.h> #else
(~line 37) and replace it with
#if LINUX_VERSION_CODE < KERNEL_VERSION(3, 1, 0) # include <linux/amd-iommu.h> #else
- Recompile the needed modules:
$ su -c '/etc/init.d/vboxdrv setup'