LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud
User Name
Password
Linux - Virtualization and Cloud This forum is for the discussion of all topics relating to Linux Virtualization and Linux Cloud platforms. Xen, KVM, OpenVZ, VirtualBox, VMware, Linux-VServer and all other Linux Virtualization platforms are welcome. OpenStack, CloudStack, ownCloud, Cloud Foundry, Eucalyptus, Nimbus, OpenNebula and all other Linux Cloud platforms are welcome. Note that questions relating solely to non-Linux OS's should be asked in the General forum.

Notices


Reply
  Search this Thread
Old 05-15-2013, 09:37 AM   #1
gabytf
Member
 
Registered: Jun 2010
Location: Kota Kinabalu, Sabah, Malaysia
Distribution: Slackware64 15, -current
Posts: 172

Rep: Reputation: 1
vboxdrv Kernel Module not loaded while running Virtualbox


This is the message i got while i run virtualbox in my slackware current 32bit in my DELL Inspiron Laptop.
I couldn't understand how to recompile the kernel module and it not run when i run the vnoxdrv setup, it says "command not found".

Please kindly help. Thank you.


Quote:
bash-4.2# virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
available for the current kernel (3.8.13) or it failed to
load. Please recompile the kernel module and install it by

sudo /etc/init.d/vboxdrv setup

You will not be able to start VMs until this problem is fixed.
Quote:
bash-4.2# cat /proc/cpuinfo
processor : 0
vendor_id : GenuineIntel
cpu family : 6
model : 13
model name : Intel(R) Pentium(R) M processor 1.70GHz
stepping : 6
microcode : 0x17
cpu MHz : 600.000
cache size : 2048 KB
fdiv_bug : no
hlt_bug : no
f00f_bug : no
coma_bug : no
fpu : yes
fpu_exception : yes
cpuid level : 2
wp : yes
flags : fpu vme de pse tsc msr mce cx8 sep mtrr pge mca cmov clflush dts acpi mmx fxsr sse sse2 ss tm pbe bts est tm2
bogomips : 1196.04
clflush size : 64
cache_alignment : 64
address sizes : 32 bits physical, 32 bits virtual
power management:

bash-4.2#

Last edited by gabytf; 05-15-2013 at 09:39 AM.
 
Old 05-15-2013, 10:33 AM   #2
camorri
LQ 5k Club
 
Registered: Nov 2002
Location: Somewhere inside 9.9 million sq. km. Canada
Distribution: Slackware 15.0, current, slackware-arm-currnet
Posts: 6,243

Rep: Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861Reputation: 861
Some questions.

How did you install vbox? From the slackbuild or by downloading from Oracle? The reason I ask, is the install methods are different, and the location of the files is different.

The message 'command not found' simply indicates there is no path to the command you typed.

Next, what command, exactly, did you type?

Quote:
sudo /etc/init.d/vboxdrv setup
From the message posted, if this is what you typed, have you got the sudo package installed? If not, then this explains the 'command not found'. For the command to work, you would have to have edited the sudoers file, and have allowed your user to execute the command.

What you can try, is su to root. Then try 'vboxdrv setup' ( without the quotes ). If that fails to run, copy and paste the error messages here.
 
1 members found this post helpful.
Old 05-15-2013, 10:57 AM   #3
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Rep: Reputation: 174Reputation: 174
I had some odd problems when I first installed virtualbox that all turned out to be related to file permissions. The errors I was getting really gave no clue that it was related to permissions.

Did you install from the slackbuilds on slackbuilds.org? Did you install the virtualbox-kernel package? If so, vboxdrv.ko should be found in /lib/modules/<kernel-version>/misc/. On my 13.37 system, it's in /lib/modules/2.6.37.6-smp/misc.

Issue command "lsmod | grep -i vbox" and see if it's loaded. If not, try "modprobe vboxdrv" and check for errors. It should get loaded when you run "/etc/rc.d/rc.vboxdrv start".

Did you set up the vboxusers group and connect your normal user account to it?

Check permissions and ownership of virtualbox files and directories. /etc/vbox/vbox.cfg should be owned by root with vboxusers as the group, and at least read permissions for owner and group.

I'm not sure if required, but I chowned all the files in /usr/lib/virtualbox and subdirectories to root:vboxusers also.
 
1 members found this post helpful.
Old 05-15-2013, 11:40 AM   #4
gabytf
Member
 
Registered: Jun 2010
Location: Kota Kinabalu, Sabah, Malaysia
Distribution: Slackware64 15, -current
Posts: 172

Original Poster
Rep: Reputation: 1
Quote:
How did you install vbox? From the slackbuild or by downloading from Oracle?
I downloaded from Oracle(https://www.virtualbox.org/wiki/Downloads) for my Linux hosts.

While run the command under root:
Quote:
root@darkstar:~# vboxdrv setup
-su: vboxdrv: command not found
root@darkstar:~#
Quote:
If so, vboxdrv.ko should be found in /lib/modules/<kernel-version>/misc/. On my 13.37 system, it's in /lib/modules/2.6.37.6-smp/misc.
Yes, the vboxdrv.ko is found.

but,

Nothing happened when:
Quote:
root@darkstar:~# lsmod | grep -i vbox
root@darkstar:~#
For
Quote:
If not, try "modprobe vboxdrv" and check for errors.
output is
Quote:
modprobe: ERROR: could not insert 'vboxdrv': Exec format error
root@darkstar:~#
 
Old 05-15-2013, 11:51 AM   #5
gabytf
Member
 
Registered: Jun 2010
Location: Kota Kinabalu, Sabah, Malaysia
Distribution: Slackware64 15, -current
Posts: 172

Original Poster
Rep: Reputation: 1
i got the answer from the user manual, but i still don't know how.
Quote:
Linux kernel module refuses to load

If the VirtualBox kernel module (vboxdrv) refuses to load, i.e. you get an "Error inserting vboxdrv: Invalid argument", check (as root) the output of the dmesg command to find out why the load failed. Most probably the kernel disagrees with the version of the gcc used to compile the module. Make sure that you use the same compiler as used to build the kernel.

The last two line of the dmesg command:
Quote:
[ 5411.564505] vboxdrv: version magic '3.8.13-smp SMP mod_unload PENTIUMIII ' should be '3.8.13 mod_unload 486 '
[ 5659.706647] vboxdrv: version magic '3.8.13-smp SMP mod_unload PENTIUMIII ' should be '3.8.13 mod_unload 486 '
root@darkstar:~#
How to fix it?

and

Quote:
[ 0.000000] Linux version 3.8.13 (root@hive) (gcc version 4.8.0 (GCC) ) #2 Sun May 12 20:55:13 CDT 2013

Last edited by gabytf; 05-15-2013 at 11:53 AM.
 
Old 05-15-2013, 11:59 AM   #6
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Rep: Reputation: 174Reputation: 174
Maybe you are picking up an old version of vboxdrv, or one compiled for a different kernel version.

Try "modprobe --verbose vboxdrv". If it encounters an error, it should tell you what module it was trying to load.
 
1 members found this post helpful.
Old 05-15-2013, 12:13 PM   #7
gabytf
Member
 
Registered: Jun 2010
Location: Kota Kinabalu, Sabah, Malaysia
Distribution: Slackware64 15, -current
Posts: 172

Original Poster
Rep: Reputation: 1
Quote:
bash-4.2# modprobe --verbose vboxdrv
insmod /lib/modules/3.8.13/misc/vboxdrv.ko
modprobe: ERROR: could not insert 'vboxdrv': Exec format error
bash-4.2#
Quote:
Maybe you are picking up an old version of vboxdrv, or one compiled for a different kernel version
i installed VirtualBox 4.2.12 for Linux -All distributions i386
and my slackware kernel is 3.8.13, how do i know which kernel version my installed virtualbox compiled with?
 
Old 05-15-2013, 02:07 PM   #8
Z038
Member
 
Registered: Jan 2006
Location: Dallas
Distribution: Slackware
Posts: 912

Rep: Reputation: 174Reputation: 174
You can check the output from the build and see if the vboxdrv make referenced the right module and source libraries for 3.8.13, e.g., something like /lib/modules/3.8.13/build and /usr/src/linux-3.8.13.

To confirm, you built this on a 32 bit system? If building on a 64-bit system, you should use the AMD64 package from the virtualbox download site. The error messages you got make me wonder if you got a mismatch between the package and your architecture.

I didn't build from the downloads on the virtualbox site. I used the Slackbuild scripts from Slackbuilds.org. That might be something for you to consider if building for Slackware.
 
Old 05-16-2013, 01:43 PM   #9
EDDY1
LQ Addict
 
Registered: Mar 2010
Location: Oakland,Ca
Distribution: wins7, Debian wheezy
Posts: 6,841

Rep: Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649Reputation: 649
You can also check virtualbog log under /var/log/
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
virtualbox vboxdrv problem on Slackware 13.37 joao Linux - Virtualization and Cloud 2 10-13-2011 01:24 PM
[SOLVED] virtualbox 4.0 won't compile it's vboxdrv module radiodee1 Debian 2 07-16-2011 01:01 PM
module System Services can not be loaded. KDE3 running on Ubuntu 9.10 mikeboul Linux - Newbie 0 01-14-2010 10:28 PM
problem with virtualbox and vboxdrv driver shifter Ubuntu 2 06-08-2008 11:10 AM
problem with virtualbox and vboxdrv driver shifter Linux - Software 1 06-07-2008 11:14 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Virtualization and Cloud

All times are GMT -5. The time now is 12:29 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration