Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] VirtualBox /etc/init.d/vboxdrv problem
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Desktop Environments
View previous topic :: View next topic  
Author Message
queen
Veteran
Veteran


Joined: 19 Jul 2005
Posts: 1554

PostPosted: Fri Nov 30, 2012 9:50 pm    Post subject: [SOLVED] VirtualBox /etc/init.d/vboxdrv problem Reply with quote

I used until now virtualbox 4.2.4 without problems. I am not sure what happened but I can't launch a machine due to the following errors:

Code:
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.4.9-gentoo) 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.


So I ran
Code:
 sudo /etc/init.d/vboxdrv setup
but then it fails with:
Code:
 * Stopping VirtualBox kernel modules ...                                                                                       [ ok ]
 * Removing old VirtualBox pci kernel module ...                                                                                [ ok ]
 * Removing old VirtualBox netadp kernel module ...                                                                             [ ok ]
 * Removing old VirtualBox netflt kernel module ...                                                                             [ ok ]
 * Removing old VirtualBox kernel module ...                                                                                    [ ok ]
 * Recompiling VirtualBox kernel modules ...                                                                                    [ ok ]
 * Starting VirtualBox kernel modules ...
 * modprobe vboxdrv failed. Please use 'dmesg' to find out why


dmesg says:
Code:
warning: `VirtualBox' uses 32-bit capabilities (legacy support in use)
vboxdrv: disagrees about version of symbol sched_setscheduler
vboxdrv: Unknown symbol sched_setscheduler (err -22)
vboxdrv: disagrees about version of symbol wake_up_process



I have installed app-emulation/virtualbox-modules 4.2.4 and added to
Code:
 /etc/conf.d/modules
modules="vboxdrv vboxnetflt vboxnetadp"



but
Code:
modprobe vboxdrv
FATAL: Error inserting vboxdrv (/lib/modules/3.4.9-gentoo/misc/vboxdrv.ko): Invalid argument


I belong to vboxusers group

Anyone has some idea what to do?


Last edited by queen on Sat Dec 01, 2012 1:15 am; edited 1 time in total
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


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

PostPosted: Fri Nov 30, 2012 11:15 pm    Post subject: Reply with quote

queen,

dmesg may give more information about version mismatches but the fix is always the same.

Code:
vboxdrv: disagrees about version of symbol sched_setscheduler
vboxdrv: Unknown symbol sched_setscheduler (err -22)
vboxdrv: disagrees about version of symbol wake_up_process
suggests that either the module you are trying to load is not built against the configured kernel you are actually running, or you have changed the kernel since the modules was built.

As all external kernel modules use /usr/src/linux to find the kernel to build against, make sure your symlink points to the right kernel and that its the kernel you are running.
uname -a and readlink are your friends here.

If thats OK, rebuild your kernel using your usual method starting with
Code:
make clean

Reinstall the kernel and modules and boot into it. Check uname -a ... you really are running your new kernel, aren't you?

Now rebuild virtualbox-modules.

At this point you know you have a clean build of the kernel, its modules and virtualbox-modules. All built at the same time, with the same settings and the same gcc without any left over binaries that make might have mistakenly reused.
_________________
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: 1554

PostPosted: Sat Dec 01, 2012 12:15 am    Post subject: Reply with quote

NeddySeagoon wrote:
queen,

dmesg may give more information about version mismatches but the fix is always the same.

Code:
vboxdrv: disagrees about version of symbol sched_setscheduler
vboxdrv: Unknown symbol sched_setscheduler (err -22)
vboxdrv: disagrees about version of symbol wake_up_process
suggests that either the module you are trying to load is not built against the configured kernel you are actually running, or you have changed the kernel since the modules was built.

As all external kernel modules use /usr/src/linux to find the kernel to build against, make sure your symlink points to the right kernel and that its the kernel you are running.
uname -a and readlink are your friends here.

If thats OK, rebuild your kernel using your usual method starting with
Code:
make clean

Reinstall the kernel and modules and boot into it. Check uname -a ... you really are running your new kernel, aren't you?

Now rebuild virtualbox-modules.

At this point you know you have a clean build of the kernel, its modules and virtualbox-modules. All built at the same time, with the same settings and the same gcc without any left over binaries that make might have mistakenly reused.


I use a relative new kernel (although not the latest). It's 3.4.9. There are no other versions of kernel installed.
Code:
uname -a
Linux my-net 3.4.9-gentoo #1 SMP Sat Nov 17 15:46:20 IST 2012 x86_64 Intel(R) Core(TM) i7-3610QM CPU @ 2.30GHz GenuineIntel GNU/Linux


I did made some changes 2 days ago but it was related to networking. I didn't touch anything else.
Code:
readlink -f /usr/src/linux
/usr/src/linux-3.4.9-gentoo


I will try your suggestion of make clean.

EDIT: make clean and re-emerge virtualbox-modules + reboot did the trick.

Thanks ;-)
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Desktop Environments 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