LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Debian (http://www.linuxquestions.org/questions/debian-26/)
-   -   Cannot run Virtualbox in Custom Kernel (http://www.linuxquestions.org/questions/debian-26/cannot-run-virtualbox-in-custom-kernel-644499/)

davcefai 05-24-2008 12:01 PM

Cannot run Virtualbox in Custom Kernel
 
VirtualBox runs on the stock linux 2.6.25-2-xen-686.

However I have had to compile a custom kernel since I use the NVidia driver and this will not install on a Xen-enabled kernel.

Now I cannot run Virtual Box.

Code:

modprobe vboxdrv
returns

Code:

FATAL: Module vboxdrv not found.
I have copied the /lib/modules/2.6.25-2-686/extra/ directory to /lib/modules/2.6.25/ (my custom kernel modules) but to no avail.

Can anybody help please?

makuyl 05-24-2008 12:07 PM

You have to build the vboxdrv module against your new kernel source.
How did you install virtualbox? Can you do:
cd /usr/share/virtualbox/src/
make
sudo checkinstall -D make install
sudo modprobe vboxdrv

Edit: Another option is:
cd /usr/src/path-to-virtualbox-source
m-a prepare
m-a a-i virtualbox
m-a install virtualbox

Either way IMO it's better to use the binary virtualbox for lenny than apt-get the ose version which doesn't have usb support. With the binary version you build the module from /usr/share/virtualbox/src/.

davcefai 05-24-2008 01:16 PM

Wow! That was an incredibly fast response!

I installed Virtualbox from the Debian Repositories.

The checkinstall -D make install failed with a strange message:

Quote:

dpkg-deb - error: (upstream) version (`ose') doesn't contain any digits
dpkg-deb: 1 errors in control file
EDIT

m-a a-i virtualbox failed too! The log file was empty.

AlucardZero 05-24-2008 01:35 PM

# /etc/init.d/vboxdrv setup

makuyl 05-24-2008 01:47 PM

Did you apt-get the virtualbox-ose-source package? I don't suppose debs work for self compiled kernels.

BTW, What does "uname -r" say? If 2.6.25-yourname or some such, recompile to 2.6.25-yourname1. Sometimes building debs against a kernel with no numbers in the revision (yourname) borks things up.

lycan 05-27-2008 07:56 AM

Kernel in SID is built using GCC 4.1. You need to install gcc-4.1 package before you try building virtualbox kernel module.

Run the following commands as root:

Code:

1. apt-get install gcc-4.1
2. apt-get install linux-headers-{$uname -r}
3. export CC=gcc-4.1
4. /etc/init.d/vboxdrv setup

Now include "vboxdrv" in /etc/modules otherwise you have to manually load virtualbox module with every restart.

davcefai 05-28-2008 01:28 AM

No problem with the gcc-4.1 compiler. However I'm still tangede up and hope to be able to do some more work when I can get home at a reasonable hour.

pliqui 05-29-2008 12:29 AM

I', having an error with VirtualBox, this happened suddenly, 1 day i ran it perfect, the other day didn't work, i think that was after a new kernel i installed (24.1), i got back the original kernel and nothing. I'm using a Lenny/Unstable system

Code:

debian:/usr/bin# uname -r
2.6.22-3-686-bigmem

I reinstalled, using gcc 4.1 and the GCC default on lenny and nothing,

Code:

debian:/usr/bin# aptitude reinstall virtualbox
Reading package lists... Done
Building dependency tree     
Reading state information... Done
Reading extended state information     
Initializing package states... Done
Reading task descriptions... Done 
The following packages will be REINSTALLED:
  virtualbox
0 packages upgraded, 0 newly installed, 1 reinstalled, 0 to remove and 0 not upgraded.
Need to get 0B/16.1MB of archives. After unpacking 0B will be used.
Writing extended state information... Done
Preconfiguring packages ...
(Reading database ... 138974 files and directories currently installed.)
Preparing to replace virtualbox 1.5.6-28266_Debian_etch (using .../virtualbox_1.5.6-28266%5fDebian%5fetch_i386.deb) ...
Stopping VirtualBox kernel module: vboxdrv.
Shutting down VirtualBox host networking...done.
Unpacking replacement virtualbox ...
Setting up virtualbox (1.5.6-28266_Debian_etch) ...
addgroup: The group `vboxusers' already exists and is not a system group. Exiting.
Messages emitted during module compilation will be logged to /var/log/vbox-install.log.
Success!
Starting VirtualBox kernel module: vboxdrv.
Starting VirtualBox host networking...done.
Reading package lists... Done           
Building dependency tree     
Reading state information... Done
Reading extended state information     
Initializing package states... Done
Reading task descriptions... Done

this is the error i got

Code:

Callee RC:
0x80470007

I have Vmware also installed and running smoothly

Thanks in advance


All times are GMT -5. The time now is 02:41 AM.