Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Can't run virtualbox.
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware
View previous topic :: View next topic  
Author Message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 359
Location: Tokyo, Japan

PostPosted: Mon Apr 15, 2013 1:50 am    Post subject: Can't run virtualbox. Reply with quote

I am using the following wiki to install and run VirtualBox. http://wiki.gentoo.org/wiki/VirtualBox but can't get it to run.

When I execute the requested modprobes it kicks out errors.

Quote:
# modprobe vboxdrv
modprobe: ERROR: could not insert 'vboxdrv': Exec format error
# modprobe vboxnetadp
modprobe: ERROR: could not insert 'vboxnetadp': Exec format error
# modprobe vboxnetflt
modprobe: ERROR: could not insert 'vboxnetflt': Exec format error


If I try to run the app I get a highly cryptic, at least to me, error message concerning the modules.

Quote:
# VirtualBox
WARNING: The VirtualBox kernel modules are not loaded.
Please load all the needed kernel modules by:

for m in vbox{drv,netadp,netflt}; do modprobe $m; done

You will not be able to start VMs until this problem is fixed.
Qt WARNING: Qt: Session management error: Authentication Rejected, reason : None of the authentication protocols specified are supported and host-based authentication failed
Qt WARNING: Bus::open: Can not get ibus-daemon's address.


I really haven't have any idea what
Code:
for m in vbox{drv,netadp,netflt}; do modprobe $m; done
is instructing me to do and I have hunted around the kernel for compile options for vbox with no luck.

Thanks.
Back to top
View user's profile Send private message
slis
n00b
n00b


Joined: 11 Oct 2010
Posts: 57
Location: Limanowa

PostPosted: Mon Apr 15, 2013 4:50 am    Post subject: Reply with quote

Hi!

The line:
Code:
for m in vbox{drv,netadp,netflt}; do modprobe $m; done

is responsible for loading modules needed by virtualbox to run.
In it's minimal requirements it needs vboxdrv, but especially when you're using custom network settings you have to load also vboxnetadp and vboxnetflt. So this command does.

The exec format error you've got probably means that you're running older kernel that this modules has build.
First try is to rebuild app-emulation/virtualbox-modules.
Code:
emerge app-emulation/virtualbox-modules
Back to top
View user's profile Send private message
imaginasys
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2009
Posts: 83
Location: Québec

PostPosted: Mon Apr 15, 2013 1:01 pm    Post subject: Reply with quote

I know it seems too easy but did you tried : # /etc/init.d/vboxdrv setup

Regards,
BT :mrgreen:
Back to top
View user's profile Send private message
Sum1
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2006
Posts: 104

PostPosted: Mon Apr 15, 2013 1:40 pm    Post subject: Reply with quote

I'm receiving a similar error message but ran out of time this weekend to fix it.
I found this thread and it looks to have some advice on installing/loading the correct modules --

http://forums.gentoo.org/viewtopic-t-943892-highlight-virtualbox+vboxdrv.html
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 359
Location: Tokyo, Japan

PostPosted: Tue Apr 16, 2013 2:19 am    Post subject: Reply with quote

slis wrote:
Hi!

The line:
Code:
for m in vbox{drv,netadp,netflt}; do modprobe $m; done

is responsible for loading modules needed by virtualbox to run.
In it's minimal requirements it needs vboxdrv, but especially when you're using custom network settings you have to load also vboxnetadp and vboxnetflt. So this command does.

The exec format error you've got probably means that you're running older kernel that this modules has build.
First try is to rebuild app-emulation/virtualbox-modules.
Code:
emerge app-emulation/virtualbox-modules


So where and how am I adding that line, or executing it?

Trying to rebuild generated the following error but I followed the instructions and then was able to successfully rebuild.

Quote:
>>> Failed to emerge app-emulation/virtualbox-modules-4.1.24, Log file:

>>> '/var/tmp/portage/app-emulation/virtualbox-modules-4.1.24/temp/build.log'

* Messages for package app-emulation/virtualbox-modules-4.1.24:

* These sources have not yet been prepared.
* We cannot build against an unprepared tree.
* To resolve this, please type the following:
*
* # cd /usr/src/linux
* # make oldconfig
* # make modules_prepare
*
* Then please try merging this module again.
* ERROR: app-emulation/virtualbox-modules-4.1.24 failed (setup phase):
* Kernel sources need compiling first
*
* Call stack:
* ebuild.sh, line 93: Called pkg_setup
* virtualbox-modules-4.1.24.ebuild, line 31: Called linux-mod_pkg_setup
* linux-mod.eclass, line 563: Called check_kernel_built
* linux-info.eclass, line 651: Called die
* The specific snippet of code:
* die "Kernel sources need compiling first"
*
* If you need support, post the output of `emerge --info '=app-emulation/virtualbox-modules-4.1.24'`,
* the complete build log and the output of `emerge -pqv '=app-emulation/virtualbox-modules-4.1.24'`.
* The complete build log is located at '/var/tmp/portage/app-emulation/virtualbox-modules-4.1.24/temp/build.log'.
* The ebuild environment file is located at '/var/tmp/portage/app-emulation/virtualbox-modules-4.1.24/temp/die.env'.
* Working directory: '/var/tmp/portage/app-emulation/virtualbox-modules-4.1.24'
* S: '/var/tmp/portage/app-emulation/virtualbox-modules-4.1.24/work'


However this didn't fix my initial problem and the error generated is the same.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 359
Location: Tokyo, Japan

PostPosted: Tue Apr 16, 2013 2:20 am    Post subject: Reply with quote

imaginasys wrote:
I know it seems too easy but did you tried : # /etc/init.d/vboxdrv setup

Regards,
BT :mrgreen:


Quote:
# /etc/init.d/vboxdrv setup
bash: /etc/init.d/vboxdrv: No such file or directory
Back to top
View user's profile Send private message
imaginasys
Tux's lil' helper
Tux's lil' helper


Joined: 26 Dec 2009
Posts: 83
Location: Québec

PostPosted: Tue Apr 16, 2013 2:48 am    Post subject: Reply with quote

Budoka wrote:
Quote:
# /etc/init.d/vboxdrv setup
bash: /etc/init.d/vboxdrv: No such file or directory


Are you on systemd ? There should be a service called "vboxdrv"

on my other computer at work, I have virtualbox on Ubuntu, and there are the following services for virtualbox:

Code:
bernard@M164911:/etc/init.d$ ls vbox*
vboxautostart-service  vboxballoonctrl-service  vboxdrv  vboxweb-service


And when I upgrade the kernel, I have to run "/etc/init.d/vboxdrv setup" to link the new modules with the kernel.
But it may be different on gentoo. I only have KVM on my gentoo here so I can't be sure.

Sorry,
BT
:mrgreen:
Back to top
View user's profile Send private message
slis
n00b
n00b


Joined: 11 Oct 2010
Posts: 57
Location: Limanowa

PostPosted: Tue Apr 16, 2013 5:11 am    Post subject: Reply with quote

Quote:
So where and how am I adding that line, or executing it?


You can call it anywhere in console, as root.
Maybe it's good to add those modules to autoload at system boot?


And one another guess from me: please check where symlink /usr/src/linux is pointing to?
When building VirtualBox modules it have to point to current kernel version.

The easiest way to check that is to call:
Code:
eselect kernel list


and if there is wrong kernel selected, you may switch to correct by using
Code:
eselect kernel set KERNEL


After that you have to re-emerge virtualbox-modules again.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 359
Location: Tokyo, Japan

PostPosted: Tue Apr 16, 2013 5:28 am    Post subject: Reply with quote

slis wrote:
Quote:
So where and how am I adding that line, or executing it?


You can call it anywhere in console, as root.
Maybe it's good to add those modules to autoload at system boot?


And one another guess from me: please check where symlink /usr/src/linux is pointing to?
When building VirtualBox modules it have to point to current kernel version.

The easiest way to check that is to call:
Code:
eselect kernel list


and if there is wrong kernel selected, you may switch to correct by using
Code:
eselect kernel set KERNEL


After that you have to re-emerge virtualbox-modules again.


Thanks. I ran it from the cli as root and still get the Exec format errors.

Quote:
# for m in vbox{drv,netadp,netflt}; do modprobe $m; done
modprobe: ERROR: could not insert 'vboxdrv': Exec format error
modprobe: ERROR: could not insert 'vboxnetadp': Exec format error
modprobe: ERROR: could not insert 'vboxnetflt': Exec format error


I checked my kernel symlink as you suggested and it is indeed pointing to the most recent kernel.

Quote:
$ eselect kernel list
Available kernel symlink targets:
[1] linux-3.6.11-gentoo
[2] linux-3.6.11-gentoo-r1
[3] linux-3.8.4-gentoo *


Any other ideas?
Back to top
View user's profile Send private message
slis
n00b
n00b


Joined: 11 Oct 2010
Posts: 57
Location: Limanowa

PostPosted: Tue Apr 16, 2013 5:44 am    Post subject: Reply with quote

Please see what dmesg is telling after modprobe.
Paste some of the last lines from dmesg somewhere and let us know.
Back to top
View user's profile Send private message
Budoka
Guru
Guru


Joined: 03 Jun 2012
Posts: 359
Location: Tokyo, Japan

PostPosted: Tue Apr 16, 2013 5:59 am    Post subject: Reply with quote

slis wrote:
Please see what dmesg is telling after modprobe.
Paste some of the last lines from dmesg somewhere and let us know.


This is my dmesg after doing the modprobe.

http://bpaste.net/show/91695/

I assume the last bit is pertinent to my problem.

Quote:
[ 133.285951] warning: `VirtualBox' uses 32-bit capabilities (legacy support in use)
[ 1096.176207] hda-intel 0000:00:1b.0: Unstable LPIB (65480 >= 8192); disabling LPIB delay counting
[ 5512.844501] vboxdrv: no symbol version for module_layout
[ 5512.848975] vboxdrv: no symbol version for module_layout
[ 5512.853222] vboxdrv: no symbol version for module_layout
Back to top
View user's profile Send private message
slis
n00b
n00b


Joined: 11 Oct 2010
Posts: 57
Location: Limanowa

PostPosted: Tue Apr 16, 2013 6:28 am    Post subject: Reply with quote

I'm going out of ideas.
How'd you compiled your kernel? Is it gentoo-sources && manual make && install? Have you installed modules (make modules_install)?

I've found that this could be related to /usr/src/linux/Module.symvers isn't exist.

In my opinion, the surest thing to get it working would be:
1. make clean && make && make modules_install in /usr/src/kernel
2. install latest kernel image and reboot
3. emerge virtualbox virtuabox-modules

Hope it helps somehow.
Back to top
View user's profile Send private message
bonkko
n00b
n00b


Joined: 23 Apr 2013
Posts: 2

PostPosted: Tue Apr 23, 2013 11:12 am    Post subject: no modprobe vboxdrv Reply with quote

I'm using gentoo in a 64 bit environment (64 bit kernel)
I have the same problem of budoka (modprobe fails)and I did the steps described by Slis.Things don't change and error don't go away.IMHO this is a development error: Virtualbox Library ( .so files ) may be compiled by Oracle with 32 bit ABI.Otherwise the code may be affected by presence of explicit 32 bit syscall or ASM(I did not read the VBOX code,It's only one hipotesys).Does Last old relase of Vbox have the same problem in 64 bit Environment?
(Sorry for my English)
Back to top
View user's profile Send private message
slis
n00b
n00b


Joined: 11 Oct 2010
Posts: 57
Location: Limanowa

PostPosted: Tue Apr 23, 2013 11:39 am    Post subject: Reply with quote

bonkko,

which version of app-emulation/virtualbox-modules do you have installed?
Back to top
View user's profile Send private message
bonkko
n00b
n00b


Joined: 23 Apr 2013
Posts: 2

PostPosted: Tue Apr 23, 2013 12:20 pm    Post subject: Reply with quote

slis wrote:
bonkko,

which version of app-emulation/virtualbox-modules do you have installed?


4.1.24 (The portage version)
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1549

PostPosted: Sat Apr 27, 2013 2:00 pm    Post subject: Reply with quote

bonkko wrote:
slis wrote:
bonkko,

which version of app-emulation/virtualbox-modules do you have installed?


4.1.24 (The portage version)


I am having the same problem too.

I tried to emerge again virtualbox-modules and I get
Code:
Installing (1 of 1) app-emulation/virtualbox-modules-4.2.12
 * Removing app-emulation/virtualbox-modules-4.2.12 from moduledb.
 * Updating module dependencies for 3.4.9-gentoo ...
 *
 * /lib/modules/3.4.9-gentoo/build/System.map not found.
 * You must manually update the kernel module dependencies using depmod.                                                                                                                 [ !! ]
 *
 * Adding module to moduledb.
 * Starting with the 3.x release new kernel modules were added,
 * be sure to load all the needed modules.
 *
 * Please add "vboxdrv", "vboxnetflt" and "vboxnetadp" to:
 * /etc/conf.d/modules


Indeed it doesn't have System.map in that directory.
I am tempted to cp System.map from /boot.

dmesg says:
Code:
 vboxdrv: no symbol version for module_layout


depmod -a didn't help.

you used genkernel to build the kernel?

you have KMS build in the kernel?
check
Code:
  grep KMS /usr/src/linux/.config
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1549

PostPosted: Tue Apr 30, 2013 7:57 am    Post subject: Reply with quote

I solved the problem.
Bonqo, here is what I did. You should follow these instructions:

1. cd /usr/src/linux
2. make clean
3. compile your kernel. make sure you have KMS enabled in the kernel. In my case I had it already. Check with the command
Code:
 grep KMS /usr/src/linux/.config
4. emerge again virtualbox-modules. In my case I re-emerge other packages of virtualbox too (just to be on the safe side).
5. reboot
6. now run
/etc/init.d/vboxdrv setup

you shouldn't have any errors when you emerge again virtualbox-modules.

Note: In my case I forgot to emerge again the package before rebooting. It worked as well.
Back to top
View user's profile Send private message
rldawson
n00b
n00b


Joined: 20 May 2011
Posts: 19

PostPosted: Mon May 06, 2013 2:50 pm    Post subject: Reply with quote

Here is a small tidbit that could be helpful:

Code:
emerge module-rebuild;module-rebuild rebuild;echo "modules=\"vboxdrv  vboxnetadp vboxnetflt vboxpci\"" >> /etc/conf.d/modules
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1549

PostPosted: Sat Jun 15, 2013 3:36 pm    Post subject: Reply with quote

rldawson wrote:
Here is a small tidbit that could be helpful:

Code:
emerge module-rebuild;module-rebuild rebuild;echo "modules=\"vboxdrv  vboxnetadp vboxnetflt vboxpci\"" >> /etc/conf.d/modules


This is really cool. I didn't know there is such a program.
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 31875
Location: 56N 3W

PostPosted: Sat Jun 15, 2013 7:42 pm    Post subject: Reply with quote

Hmm, @module-rebuild is a set in portage-2.2
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1549

PostPosted: Sat Jun 15, 2013 9:29 pm    Post subject: Reply with quote

NeddySeagoon wrote:
Hmm, @module-rebuild is a set in portage-2.2


Nice. When portage-2.2 will be stable?
Back to top
View user's profile Send private message
jasn
Guru
Guru


Joined: 05 May 2005
Posts: 412
Location: Maryland, US

PostPosted: Sat Jun 15, 2013 11:10 pm    Post subject: Reply with quote

Actually on my system with;
Code:
sys-apps/portage-2.1.12.4

The following sets exist:
Code:
    live-rebuild
    module-rebuild
    preserved-rebuild
    security
    selected
    system
    world
    x11-module-rebuild

Good Luck..
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Kernel & Hardware All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum