LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (http://www.linuxquestions.org/questions/linux-software-2/)
-   -   Where to get vboxdrv.ko for 2.6.31.3 kernel? (http://www.linuxquestions.org/questions/linux-software-2/where-to-get-vboxdrv-ko-for-2-6-31-3-kernel-795172/)

sevs 03-13-2010 12:56 PM

Where to get vboxdrv.ko for 2.6.31.3 kernel?
 
Hi there!
I heva Debian "Lenny" 5.0 with a 2.6.31.3 kernel.
I've got some trouble with VirtualBox.

When I start virtualbox I get such outbut:
Quote:

[sergey@localhost:~]$ virtualbox
WARNING: The character device /dev/vboxdrv does not exist.
Please install the virtualbox-ose-modules package for your kernel and
load the module named vboxdrv into your system.

You will not be able to start VMs until this problem is fixed.
But when I do 'insmod vboxdrv.ko' (or even w/o '.ko', 'modprobe vboxdrv') it says that there is no vboxdrv.ko.

What have I to do to run virtual-machines?

(NOTE: Kernel 2.6.31.3 I've compiled manually, and there is no virtualbox-ose-modules package for kernel 2.6.31.3 in repository)

Sorry for bad English.
Thanks in advance.

troop 03-13-2010 01:05 PM

$ sudo module-assistant prepare virtualbox-ose
$ sudo module-assistant auto-install virtualbox-ose
$ ls /usr/src/virtualbox-ose-modules-*
$ sudo dpkg -i /usr/src/virtualbox-ose-modules-*.deb
http://forums.virtualbox.org/viewtopic.php?f=7&t=26198

sevs 03-13-2010 01:20 PM

But I've got following output
Quote:

[root@localhost:~] # dpkg-i / usr/src/virtualbox-ose-modules- *. deb
(Reading database ... currently installed 409380 files and directories.)
Preparing to replace virtualbox-ose-modules-2.6.31.3 3.1.4-dfsg-2 (using a file .../virtualbox-ose-modules-2.6.31.3_3.1.4-dfsg-2_i386.deb) ...
Unpacking replacement virtualbox-ose-modules-2.6.31.3 ...
dpkg: dependency problems prevent configuration of virtualbox-ose-modules-2.6.31.3:
virtualbox-ose-modules-2.6.31.3 depends on linux-modules-2.6.31.3 | linux-image-2.6.31.3, however:
Package linux-modules-2.6.31.3 is not installed.
Package linux-image-2.6.31.3 is not installed.
dpkg: error processing virtualbox-ose-modules-2.6.31.3 (- install):
dependency problems - leaving unconfigured
When processing the next packet errors have occurred:
virtualbox-ose-modules-2.6.31.3
------------------------------------
Sorry - I have russian locale, so I translated the outbut through Google.

sevs 03-13-2010 01:48 PM

When I do 'm-a a-i virtualbox-ose', I get following output:
Quote:

Updated information about 1 packet
Getting the kernel source with the version: 2.6.31.3
The kernel headers available in / lib/modules/2.6.31.3/source
apt-get install build-essential
Reading package lists ... Done
Building dependency tree
Reading state information ... Done
Already installed the newest version of build-essential.
The following packages are installed automatically and are no longer required:
phonon rplay-client tix simgear1.0.0
To remove them, use 'apt-get autoremove'.
0 upgraded, 0 newly installed packages to remove marked packages 0, and 66 not upgraded.

Yes!
unpack
Extracting the package tarball, / usr/src/virtualbox-ose.tar.bz2, please wait ...
Target package file / usr/src/virtualbox-ose-modules-2.6.31.3_3.1.4-dfsg-2_i386.deb already exists, we will not rebuild!
(however, you could use the-f switch to ignore it)
dpkg-Ei / usr/src/virtualbox-ose-modules-2.6.31.3_3.1.4-dfsg-2_i386.deb
Selecting previously deselected package virtualbox-ose-modules-2.6.31.3.
(Reading database ... currently installed 409397 files and directories.)
Unpacking virtualbox-ose-modules-2.6.31.3 (from file .../virtualbox-ose-modules-2.6.31.3_3.1.4-dfsg-2_i386.deb) ...
dpkg: dependency problems prevent configuration of virtualbox-ose-modules-2.6.31.3:
virtualbox-ose-modules-2.6.31.3 depends on linux-modules-2.6.31.3 | linux-image-2.6.31.3, however:
Package linux-modules-2.6.31.3 is not installed.
Package linux-image-2.6.31.3 is not installed.
dpkg: error processing virtualbox-ose-modules-2.6.31.3 (- install):
dependency problems - leaving unconfigured
When processing the next packet errors have occurred:
virtualbox-ose-modules-2.6.31.3

I: Direct installation failed, trying to perform the post installation depending

apt-get-f install
Reading package lists ... Done
Building dependency tree
Reading state information ... Done
Fix dependencies ... Done
The following packages are installed automatically and are no longer required:
phonon rplay-client tix simgear1.0.0
To remove them, use 'apt-get autoremove'.
Packages, which will be upgraded:
virtualbox-ose-modules-2.6.31.3
0 upgraded, 0 newly installed packages to remove the observed 1 packet, and 66 not upgraded.
not established until the end or removed 1 package.
After this operation, the amount of additional disk space will decrease to 373kB.
Do you want to continue [Y / n]? D
(Reading database ... currently installed 409403 files and directories.)
Removing virtualbox-ose-modules-2.6.31.3 ...
[Root @ localhost: / etc / apt] # apt-get install linux-image-2.6.31.3
Reading package lists ... Done
Building dependency tree
Reading state information ... Done
Package linux-image-2.6.31.3 available, but is referred to by another package.
This could mean that the package is missing, outdated, or available from sources other than those listed in sources.list
E: For package linux-image-2.6.31.3 no installation candidate
--------------------------------------
This is being translated through Google too.

I think that output in my previous post is being appeared because of not installed package linux-image-2.6.31.3.
So, I mind, that the reason is I have no repository for linux-image--2.6.31.3.
What is that? Do You know?

troop 03-13-2010 01:56 PM

А теперь прочитай вывод:
Code:

Target package file / usr/src/virtualbox-ose-modules-2.6.31.3_3.1.4-dfsg-2_i386.deb already exists, we will not rebuild!
(however, you could use the-f switch to ignore it)
dpkg-Ei / usr/src/virtualbox-ose-modules-2.6.31.3_3.1.4-dfsg-2_i386.deb
Selecting previously deselected package virtualbox-ose-modules-2.6.31.3. .

Это тебе не нужно, насколько понимаю. Попробуй -f использовать, как и советуется. Раз уж ты собрал ядро вручную, то и пакет должен быть собран, а не использован готовый, который еще и зависимости требует. Хотя, я бы на твоем месте, не собирал бы пакет (не уверен, что геморрой стоит того), а просто бы взял исходники модуля, собрал его и выполнил depmod. Вполне в духе сборки ядра вручную.
have I got it right that russian is more familiar to you?

sevs 03-14-2010 01:37 AM

Yeah, you got it right. But I understand English.
Now, I did it. I've build this module (vboxdrv.ko) by making 'make' and then 'make install' from 'vboxdrv' subdir.
Then I did 'depmod 2.6.31.3'.
So, I have also added my user to 'vboxusers' group. Then re-logged-in. I've even did reboot.
But still I can't understand:
1) Why I get the following output, when I try to run virtual machine:
Quote:

The VirtualBox kernel driver is not accessible to the current user. Make sure that the user has write permissions for /dev/vboxdrv by adding them to the vboxusers groups. You will need to logout for the change to take effect..
VBox status code: -1909 (VERR_VM_DRIVER_NOT_ACCESSIBLE).


Error Code:
0x80004005
Component:
Console
Interface:
IConsole {d5a1cbda-f5d7-4824-9afe-d640c94c7dcf}

But 'virtualbox' does not say me that my user does not belong to 'vboxusers' group.

2) how to make module vboxdrv.ko to be loaded automaticaly on boot up sequence.

troop 03-14-2010 05:56 AM

1. You need to add yourself to the vboxusers group.
Code:

sudo usermod -aG vboxusers login
2. try
Code:

echo "vboxdrv" >> /etc/modules
or use modconf (aptitude install modconf)

sevs 03-14-2010 07:17 AM

I've did as you said, and that gived no effect.
The message from virtalbox is still the same, but after reboot I've got no sound.

alsamixer's output is

Quote:

alsamixer: function snd_ctl_open failed for default: No such file or directory


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