You are not logged in.

#1 2009-03-15 13:59:25

generic_
Member
From: Jacksonville,FL US
Registered: 2008-12-21
Posts: 182

[SOLVED] Cant rebuld vbox modules on custom kernel

Im trying to rebuld the vbox modules for a custom kernel and I get this.

[generic@ArchLinux ~]$ sudo vbox_build_module
Password: 
Building vboxdrv for Linux 2.6.28-L1NUX
make[1]: Entering directory `/opt/virtualbox/src/vboxdrv'
for f in . linux r0drv r0drv/linux VBox common/err common/string common/log generic math/gcc; \
        do rm -f $f/*.o $f/.*.cmd $f/.*.flags; done
rm -rf .vboxdrv* .tmp_ver* vboxdrv.* Module.symvers Modules.symvers modules.order
make[1]: Leaving directory `/opt/virtualbox/src/vboxdrv'
make[1]: Entering directory `/opt/virtualbox/src/vboxnetflt'
for f in . linux r0drv r0drv/linux VBox common/err common/string common/log generic math/gcc; \
        do rm -f $f/*.o $f/.*.cmd $f/.*.flags; done
rm -rf .vboxnetflt* .tmp_ver* vboxnetflt.* Modules.symvers modules.order
make[1]: Leaving directory `/opt/virtualbox/src/vboxnetflt'
rm -f vboxdrv.ko vboxnetflt.ko
*** Building 'vboxdrv' module ***
make[1]: Entering directory `/opt/virtualbox/src/vboxdrv'
Makefile:143: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
make[1]: Leaving directory `/opt/virtualbox/src/vboxdrv'
make: *** [all] Error 2

It says to specify the KERN DIR I searched on-line a some people said I should never have to do that. Will it solve my problem if I do? What do i specify it to?

Last edited by generic_ (2009-05-15 03:12:39)


I'm just lost n00b!

Offline

#2 2009-03-15 14:08:08

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED] Cant rebuld vbox modules on custom kernel

do you have /usr/src/linux-2.6.28-ARCH ?


Give what you have. To someone, it may be better than you dare to think.

Offline

#3 2009-03-15 14:32:47

generic_
Member
From: Jacksonville,FL US
Registered: 2008-12-21
Posts: 182

Re: [SOLVED] Cant rebuld vbox modules on custom kernel

no i have custom kernel


I'm just lost n00b!

Offline

#4 2009-03-15 14:37:21

wonder
Developer
From: Bucharest, Romania
Registered: 2006-07-05
Posts: 5,941
Website

Re: [SOLVED] Cant rebuld vbox modules on custom kernel

put there your custom source /usr/src/linux-2.6.28-L1NUX or do what the output says. i think is:
export KERN_DIR=/path/to/the/source/
vbox_build_module


Give what you have. To someone, it may be better than you dare to think.

Offline

#5 2009-03-15 14:50:57

generic_
Member
From: Jacksonville,FL US
Registered: 2008-12-21
Posts: 182

Re: [SOLVED] Cant rebuld vbox modules on custom kernel

I did not build with usr/scr. Where would I specify the KERN_DIR then?


I'm just lost n00b!

Offline

#6 2009-03-15 21:07:10

generic_
Member
From: Jacksonville,FL US
Registered: 2008-12-21
Posts: 182

Re: [SOLVED] Cant rebuld vbox modules on custom kernel

anyone?


I'm just lost n00b!

Offline

#7 2009-03-15 21:44:23

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: [SOLVED] Cant rebuld vbox modules on custom kernel

Like wonder said, KERN_DIR=/path/to/the/source i.e. the path to the directory containing the kernel source that you used to build your custom kernel.

Offline

#8 2009-03-16 15:50:40

generic_
Member
From: Jacksonville,FL US
Registered: 2008-12-21
Posts: 182

Re: [SOLVED] Cant rebuld vbox modules on custom kernel

Your supposed to save your kernel source? Do you mean in /lib/modules? Or the source used to build the kernel?


I'm just lost n00b!

Offline

#9 2009-05-15 02:22:53

generic_
Member
From: Jacksonville,FL US
Registered: 2008-12-21
Posts: 182

Re: [SOLVED] Cant rebuld vbox modules on custom kernel

I know this is really old but i ran in to this same problem I use

export KERN_DIR=/path/to/the/source/

and when i run sudo vbox_build_module I get the same message what do i to specify KERN_DIR?

Last edited by generic_ (2009-05-15 02:23:33)


I'm just lost n00b!

Offline

#10 2009-05-15 03:11:48

generic_
Member
From: Jacksonville,FL US
Registered: 2008-12-21
Posts: 182

Re: [SOLVED] Cant rebuld vbox modules on custom kernel

I found out how to fix by editing the script  vbox_build_modules this is what mty script looks like if anyone wants it

#!/bin/bash
echo "Building vboxdrv for `uname -sr`"
cd "/opt/virtualbox/src"
export KERN_DIR=/usr/src/linux-2.6.29.3-IX
make clean && make && make install

I'm just lost n00b!

Offline

Board footer

Powered by FluxBB