VirtualBox

Ticket #7924 (closed defect: fixed)

Opened 3 years ago

Last modified 3 years ago

kernel compilation problem on self made kernel => Fixed in SVN

Reported by: simonbcn Owned by:
Priority: major Component: installer
Version: VirtualBox 3.2.12 Keywords:
Cc: Guest type: Windows
Host type: Linux

Description

I have compile my own kernel on Ubuntu 10.04 32 bits with:

fakeroot make-kpkg --initrd --append-to-version=-20101227 kernel-image kernel-headers

I have installed the kernel .deb packages and I've restarted the system with new kernel without problems but when I execute this:

$ sudo /etc/init.d/vboxdrv setup
 * Stopping VirtualBox kernel modules                                        
 *  done.
 * Uninstalling old VirtualBox DKMS kernel modules                           
 *  done.
 * Trying to register the VirtualBox kernel modules using DKMS           
 * Failed, trying without DKMS
 * Recompiling VirtualBox kernel modules                                    
 * Look at /var/log/vbox-install.log to find out what went wrong
$ cat /var/log/vbox-install.log
Makefile:170: *** Error: /usr/src/linux (version 2.6.36.2) does not match the current kernel (version 2.6.36.2-20101226).  Alto.
$ uname -r
2.6.36.2-20101226

But the folders exist:

/usr/src/linux-headers-2.6.36.2-20101226/
/lib/modules/2.6.36.2-20101226/

I've tried with

$ export KERN_DIR=/usr/src/linux-headers-`uname -r`

But it also doesn't work.

Change History

comment:1 follow-up: ↓ 2 Changed 3 years ago by frank

  • Status changed from new to closed
  • Resolution set to invalid

The correct fix is to install the Linux kernel headers. The proper kernel header package creates the link /lib/modules/$(uname -r)/build which points to the correct directory.

comment:2 in reply to: ↑ 1 Changed 3 years ago by simonbcn

  • Status changed from closed to reopened
  • Resolution invalid deleted

Replying to frank:

The correct fix is to install the Linux kernel headers. The proper kernel header package creates the link /lib/modules/$(uname -r)/build which points to the correct directory.

$ ls /lib/modules/$(uname -r)/build 
arch     CREDITS  Documentation  fs       ipc     lib          mm              net             samples   sound       usr      vmlinux.o
block    crypto   drivers        include  Kbuild  MAINTAINERS  modules.order   README          scripts   System.map  virt
COPYING  debian   firmware       init     kernel  Makefile     Module.symvers  REPORTING-BUGS  security  tools       vmlinux

comment:3 Changed 3 years ago by simonbcn

I have readed more forums and blogs but any solution works with VirtualBox 3.2.12
I have compiled the nvidia and OSS4 drivers without any problem. What's happening to VirtualBox!?
Are you sure that this isn't a bug?

Read this, please:  http://forums.debian.net/viewtopic.php?f=5&t=55966

# uname -r
2.6.36.2-20101230
# ll /lib/modules/2.6.36.2-20101230/
total 2976
drwxr-xr-x  4 root root   4096 2010-12-29 15:05 ./
drwxr-xr-x  8 root root   4096 2010-12-29 13:41 ../
lrwxrwxrwx  1 root root     40 2010-12-29 15:05 build -> /usr/src/linux-headers-2.6.36.2-20101230/
drwxr-xr-x 10 root root   4096 2010-12-29 13:49 kernel/
-rwxr-xr-x  1 root root  26557 2010-12-26 17:00 lguest*
drwxr-xr-x  2 root root   4096 2010-12-29 15:00 misc/
-rw-r--r--  1 root root 480379 2010-12-29 14:55 modules.alias
-rw-r--r--  1 root root 476805 2010-12-29 14:55 modules.alias.bin
-rw-r--r--  1 root root   6049 2010-12-29 13:38 modules.builtin
-rw-r--r--  1 root root   7450 2010-12-29 14:55 modules.builtin.bin
-rw-r--r--  1 root root     69 2010-12-29 14:55 modules.ccwmap
-rw-r--r--  1 root root 188129 2010-12-29 14:55 modules.dep
-rw-r--r--  1 root root 286564 2010-12-29 14:55 modules.dep.bin
-rw-r--r--  1 root root    135 2010-12-29 14:55 modules.devname
-rw-r--r--  1 root root    221 2010-12-29 14:55 modules.ieee1394map
-rw-r--r--  1 root root    218 2010-12-29 14:55 modules.inputmap
-rw-r--r--  1 root root  19738 2010-12-29 14:55 modules.isapnpmap
-rw-r--r--  1 root root     74 2010-12-29 14:55 modules.ofmap
-rw-r--r--  1 root root  78816 2010-12-29 13:38 modules.order
-rw-r--r--  1 root root 293938 2010-12-29 14:55 modules.pcimap
-rw-r--r--  1 root root   1681 2010-12-29 14:55 modules.seriomap
-rw-r--r--  1 root root    131 2010-12-29 14:55 modules.softdep
-rw-r--r--  1 root root 186280 2010-12-29 14:55 modules.symbols
-rw-r--r--  1 root root 233641 2010-12-29 14:55 modules.symbols.bin
-rw-r--r--  1 root root 695410 2010-12-29 14:55 modules.usbmap
lrwxrwxrwx  1 root root     40 2010-12-29 15:05 source -> /usr/src/linux-headers-2.6.36.2-20101230/

comment:4 follow-up: ↓ 5 Changed 3 years ago by simonbcn

Solved in VirtualBox 4. This confirms that is a bug in v3.

comment:5 in reply to: ↑ 4 Changed 3 years ago by simonbcn

Replying to simonbcn:

Solved in VirtualBox 4. This confirms that is a bug in v3.

No, I correct this info. This isn't corrected in v4.
The problem occurs if I compile the kernel with the "--append-to-version=" option.

comment:6 Changed 3 years ago by frank

  • Priority changed from blocker to major

comment:7 Changed 3 years ago by simonbcn

DKMS module solves the problem on Ubuntu Lucid.

Other solution is:

/usr/share/virtualbox/src/vboxhost/vboxdrv/build_in_tmp install KERN_DIR=/usr/src/linux-headers-`uname -r`

KERN_DIR must be point to source or headers folder of kernel.

comment:8 Changed 3 years ago by defender

Hi All!!

I have a custom kernel builded using make-kpkg with param --append_to_version=-foo. So, for example, my kernel version (as reported by uname -r) is "2.6.36.2-foo". But! Output of make -sC /lib/modules/$(uname -r)/build --no-print-directory kernelversion is "2.6.36.2" (this command is used in vboxdrv Makefile to check is link `build' points to the same kernel version) and vboxdrv pre-build checks for kernel version is failed. VirtualBox v4.0.4, Debian Squeeze 6.0, kernel version is 2.6.36.2.

comment:9 Changed 3 years ago by frank

  • Summary changed from kernel compilation problem on self made kernel to kernel compilation problem on self made kernel => Fixed in SVN

That will be fixed in the next maintenance release. We've removed that "make kernelrelease" check because it does not work with Linux 2.3.38 anymore.

comment:10 Changed 3 years ago by frank

  • Status changed from reopened to closed
  • Resolution set to fixed

Fixed in 4.0.6

Note: See TracTickets for help on using tickets.

www.oracle.com
ContactPrivacy policyTerms of Use