Jump to content

Virtualbox KERN_DIR error


Recommended Posts

Hi All,

 

I've recently moved over to Linux ( having tried it in the past, but not having the free time to learn how to run it as I want).

I have worked on computers since the 8086 days/ DOS, in the early 80's and been through the Windows mill ( 3/3.11/win95/win98/win2000/winxp etc), running both desktop and server environments.

I am quite impressed with the 2008 build and am currently running kernel 2.6.22.16-desktop-1mdv. My problem is I cannot find the kernel files in /usr/src, which I need to set the KERN_DIR to enable virtualbox to run correctly.

I have installed Virtualbox 1.5.6 but am unable to start any virtual machines.

My error code is:

 

VirtualBox kernel driver not installed. The vboxdrv kernel module was either not loaded or /dev/vboxdrv was not created for some reason. Re-setup the kernel module by executing '/etc/init.d/vboxdrv setup' as root.

VBox status code: -1908 (VERR_VM_DRIVER_NOT_INSTALLED).

 

 

Result Code:

0x80004005

Component:

Console

Interface:

IConsole {1dea5c4b-0753-4193-b909-22330f64ec45}

 

the log file shows:

 

Makefile:75: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again. Stop.

 

I would like to stick with this distribution, but am stuck between having already set up virtualbox on Scientific were the src kernel was in the usual place ( /usr/src ) and I could point the KERN references to.

 

 

Any guidance would be much appreciated.

 

( I've also posted this on the Mandriva forum)

Edited by Buzz27
Link to comment
Share on other sites

Install kernel-devel matching your installed kernel, and then run as root

vbox_build_module

Notice that after installing virtualbox and making the "vboxdrv" module, you have to "modprobe vboxdrv" (just once: no need to do it any other time), log out of your DE and then back in (so your current user gets registered to the "vboxusers" group). Else virtualbox won't run properly.

Edited by scarecrow
Link to comment
Share on other sites

First, update to the latest kernel (-16 has a major security vulnerability) and then install kernel-desktop-devel-latest.

Jim

 

Jim,

 

I have removed all the other kernels I seem to have had installed along the way, but don't seem to be able to remove their directories that easily.

Is there a way to become a SU in konqueror ( as all the module dir in /lib seem to be owned by root).

If not I'll have to do it the long way, 1 at a time. ( I've already set myself in the wheel and root groups, but still don't seem to be able to work with root dir)

 

I have tried to install the devel kernel for -16 but keep getting an error:

 

urpmi kernel-`uname -r | cut -d- -f 2`-devel-`uname -r | cut -d- -f 1`

The following packages can't be installed because they depend on packages

that are older than the installed ones:

gcc-4.2.2-3mdv2008.0

kernel-desktop-devel-2.6.22.16-1mdv-1-1mdv2008.0

Continue installation anyway? (Y/n) n

 

uname -r

2.6.22.16-desktop-1mdv

 

I don't seem to be able to find an updated kernel, other than:

kernel-mm-2.6.23-0.rc8.mm2.1mdv or kernel-linus-smp-latest

but I'm not sure which one I should be installing?

 

Am I looking in the wrong place? ( I'm using MCC and http://ftp.iasi.roedu.net/mirrors/ftp.mand.../main/testing/)?

Link to comment
Share on other sites

I have tried to install the devel kernel for -16 but keep getting an error:

 

urpmi kernel-`uname -r | cut -d- -f 2`-devel-`uname -r | cut -d- -f 1`

The following packages can't be installed because they depend on packages

that are older than the installed ones:

gcc-4.2.2-3mdv2008.0

kernel-desktop-devel-2.6.22.16-1mdv-1-1mdv2008.0

Continue installation anyway? (Y/n) n

 

uname -r

2.6.22.16-desktop-1mdv

 

Am I missing something here?

I've looked through the package stats and don't appear to have any other kernels installed

just have :

Name: kernel-desktop-2.6.22.16-1mdv

Version: 1

Release: 1mdv2008.0

Size: 24602 KB

 

and

Name: kernel-desktop-latest

Version: 2.6.22.16

Release: 1mdv2008.0

Size: 0 KB

 

Not sure why this is 0KB?

 

Any ideas??

Link to comment
Share on other sites

Is there a way to become a SU in konqueror

 

Run: kdesu konqueror

 

 

 

You may find the following links useful in sorting out the problems you have with urpmi. (I don't think you have set up the repo's properly.):

 

http://wiki.mandriva.com/en/Docs/Basic_tas...moving_software

 

http://wiki.mandriva.com/en/Releases/Mandr...#Kernel_changes

 

 

Jim

Link to comment
Share on other sites

Don't remove directories and files in /usr/src by hand... let the kernel uninstall procedure do that.

Notica aalso that any kernel upgrade requires a reboot (not adding kernel devel packages though).

 

I originally thought this could be the problem as I only have the following dir under /usr/src:

 

file:///usr/src/rpm

file:///usr/src/rpm/RPMS

file:///usr/src/rpm/RPMS/athlon

file:///usr/src/rpm/RPMS/i386

file:///usr/src/rpm/RPMS/i486

file:///usr/src/rpm/RPMS/i586

file:///usr/src/rpm/RPMS/i686

file:///usr/src/rpm/RPMS/noarch

file:///usr/src/vboxadd-1.5.0-6mdv2008.0

file:///usr/src/vboxadd-1.5.0-6mdv2008.0/dkms.conf

file:///usr/src/vboxvfs-1.5.0-6mdv2008.0

file:///usr/src/vboxvfs-1.5.0-6mdv2008.0/dkms.conf

file:///usr/src/virtualbox-1.5.0-6mdv2008.0

file:///usr/src/virtualbox-1.5.0-6mdv2008.0/dkms.conf

 

All the rpm dir have no content ( I haven't deleted anything here, only deleted empty kernel dir in the /lib/modules)

Link to comment
Share on other sites

Run: kdesu konqueror

 

 

 

You may find the following links useful in sorting out the problems you have with urpmi. (I don't think you have set up the repo's properly.):

 

http://wiki.mandriva.com/en/Docs/Basic_tas...moving_software

 

http://wiki.mandriva.com/en/Releases/Mandr...#Kernel_changes

 

 

Jim

 

I mainly use MCC, but on occasion do use urpmi from the SU terminal if I don't seem to be able to see the option I want.

I've removed my original mirror and installed a new one.

This now gives me the Kernel-desktop-latest as both 2.6.22.16-1mdv2008.0 and 2.6.22.18-1mdv2008.0.

Selected is the 2.6.22.16, is 2.6.22.18 the latest or have I still got a repo problem?

 

Which options should I have selected in the configure media ?

Is 2.6.22.18 desktop the one I should be installing on my ML350/370's ?

Link to comment
Share on other sites

You should have /main, /contrib, and /non-free as well as the corresponding /updates repos. It's safest not to use /testing or /backports. (I would remove them entirely, and not just disable them. There was a bug in mandriva-update which caused them to be used sometimes, even if they were disabled.)

 

Have you run mandriva-update? It should update your kernel to -18.

 

If I understand correctly, an ML350 is a desktop machine, not a laptop and so -desktop would be the right kernel flavour.

 

Jim

Link to comment
Share on other sites

:lol2: Finally got this to work.

(Seems to have been a combination of kernel error and bad repo mirror)!

 

I removed my original mirror, and installed another one - selecting only /main, /contrib, and /non-free as well as the corresponding /updates repos

deleting testing and backports ( as recommended).

Having previously deleted any old kernel's from my system with MCC, I ran the Updates and picked the 2.22.6.18-desktop kernel.

I ran the commands given by awilliamson ( Site Admin on the Mandriva forum):

 

urpmi kernel-`uname -r | cut -d- -f 2`-devel-`uname -r | cut -d- -f 1`

 

urpmi kernel-`uname -r | cut -d- -f 2`-devel-latest

 

and low and behold , the src files appeared in the /usr/src:

file:///usr/src/linux-2.6.22.18-desktop-1mdv

file:///usr/src/linux-2.6.22.18-desktop-1mdv/3rdparty

file:///usr/src/linux-2.6.22.18-desktop-1mdv/arch

file:///usr/src/linux-2.6.22.18-desktop-1mdv/block

file:///usr/src/linux-2.6.22.18-desktop-1mdv/crypto

file:///usr/src/linux-2.6.22.18-desktop-1mdv/Documentation

file:///usr/src/linux-2.6.22.18-desktop-1mdv/drivers

file:///usr/src/linux-2.6.22.18-desktop-1mdv/fs

file:///usr/src/linux-2.6.22.18-desktop-1mdv/include

file:///usr/src/linux-2.6.22.18-desktop-1mdv/init

file:///usr/src/linux-2.6.22.18-desktop-1mdv/ipc

file:///usr/src/linux-2.6.22.18-desktop-1mdv/kernel

file:///usr/src/linux-2.6.22.18-desktop-1mdv/lib

file:///usr/src/linux-2.6.22.18-desktop-1mdv/mm

file:///usr/src/linux-2.6.22.18-desktop-1mdv/net

file:///usr/src/linux-2.6.22.18-desktop-1mdv/scripts

file:///usr/src/linux-2.6.22.18-desktop-1mdv/security

file:///usr/src/linux-2.6.22.18-desktop-1mdv/sound

file:///usr/src/linux-2.6.22.18-desktop-1mdv/usr

file:///usr/src/linux-2.6.22.18-desktop-1mdv/.config

file:///usr/src/linux-2.6.22.18-desktop-1mdv/Kbuild

file:///usr/src/linux-2.6.22.18-desktop-1mdv/Makefile

file:///usr/src/linux-2.6.22.18-desktop-1mdv/Module.symvers

 

giving me the devel for kernel 2.22.6.18, in the /usr/src dir as I had experienced with other Distro's.

 

I then ran /etc/init.d/vboxdrv setup - as I had previously run numerous times, when it failed recompiling with the KERN_DIR error.

but this time it took a bit longer and finally compiled.

 

I have since setup a virtual Win2003 server with no problems at all.

 

I WOULD LIKE TO THANK all who contributed, especially Jim (jkerr82508) and Adam (awilliamson/ Site Admin Mandriva( from the Mandriva forum).

 

( My ML350/370's are Compaq servers running PCI-X /Ultra 320 raid 5 scsi and 8x sata raid stacks/ 4GB ram with twin processors in all),

I have experienced no problem's running them as desktop kernels, but would the server kernel offer me any benefits??

( may be another thread here!)

 

Jeff...

Link to comment
Share on other sites

  • 9 months later...
Guest drblock

Hi,

 

By combining suggestions from the discussion, I have been able to compile the vbox driver.

 

Problem: The compiler needs to find the sources of your current Linux kernel and fails to find them where expected in< /lib/modules/2.6.24.7-desktop586-2mnb/src or .../build> (to use my current kernel as an example). If you check with a file manager, you will see that these links are in fact missing.

 

Proceed as follows:

 

login as administrator with <su>

 

urpmi kernel_desktop_devel_latest

 

urpmi kernel_devel_latest

 

Now, the links should be in place and you can run:

 

/etc/init.d/vboxdrv setup

 

This will recompile and start the VirtualBox kernel module .

 

Now let's see if I can really get VBox to work with Windows XP.

 

drblock

Link to comment
Share on other sites

  • 1 year later...

I got the almost the same error msg.

1. mandriva 2010, didnot install the virtualbox 3.0.8(together with the mdv dvd)

2. I download the virtualbox3.1.4 from the virtualbox official site,and tried to install it, it seems installed successfully with the shortcut in the system menu, and the virtualbox application could be run.

3.the popup msgboxs shows: 1)can not start a new task for the virtual machine myvirtual1,virtual machine "myvirtual1"has terminated unexpectedly during startup.

the details:

 

return code:

NS_ERROR_FAILURE (0x80004005)

components:

Machine

interface:

IMachine {99404f50-dd10-40d3-889b-dd2f79f1e95e}

2)-another msgbox showed kernel driver not installed(rc=-1908)

the virtualbox linux kernel driver(vboxdrv)is either not loaded or there is a permission problem with /dev/vboxdrv. please reinstall the kernel.

'/etc/init.d/vboxdrv setup'

 

as root. Users of Ubuntu, Fedora or Mandriva should install the DKMS package first. This package keeps track of Linux kernel changes and recompiles the vboxdrv kernel module if necessary.

 

4.run urpmi dkms,successfully finished.

5.run ./vboxdrv setup, it recompiled the vbox kernel module.

it shows:

[root@localhost init.d]# ./vboxdrv setup

Stopping VirtualBox kernel module [OK]

Recompiling VirtualBox kernel module [OK]

Starting VirtualBox kernel module [OK]

[root@localhost init.d]#

 

 

then, vbox 3.1.4 runs normally.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
 Share

×
×
  • Create New...