Help - Search - Members - Calendar
Full Version: Virtualbox KERN_DIR error
MandrivaUsers.org > Advanced Topics > Virtual Machines and Emulators
Buzz27
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)
jkerr82508
First, update to the latest kernel (-16 has a major security vulnerability) and then install kernel-desktop-devel-latest.
Jim
scarecrow
Install kernel-devel matching your installed kernel, and then run as root
CODE
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.
Buzz27
QUOTE (jkerr82508 @ Mar 14 2008, 07:26 PM) *
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/)?
Buzz27
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??
jkerr82508
QUOTE
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
scarecrow
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).
Buzz27
QUOTE (scarecrow @ Mar 15 2008, 06:12 AM) *
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)
Buzz27
QUOTE (jkerr82508 @ Mar 15 2008, 03:00 AM) *
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 ?
jkerr82508
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
Buzz27
18.gif 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...
This is a "lo-fi" version of our main content. To view the full version with more information, formatting and images, please click here.
Invision Power Board © 2001-2008 Invision Power Services, Inc.