LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 06-16-2009, 05:01 AM   #1
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
Virtualbox and kernel 2.6.30


Has anyone experienced the same problems?
To be honest I don't know if the kernel is the issue, but after I upgraded my kernel to 2.6.30, I'm not able to run
/etc/rc.d/rc.vboxdrv setup

I get this error:
Recompiling VirtualBox kernel module ...failed!
(Look at /var/log/vbox-install.log to find out what went wrong)

And the log says:
/etc/rc.d/rc.vboxdrv: line 275: /usr/lib/virtualbox/src/vboxdrv/build_in_tmp: No such file or directory

So out of the error I assume there are some source files missing. I can't figure out why, because it worked while I was using the old kernel 2.6.39.3.

I tried rebuilding the kernel package and upgrade it, but I still get the same error. I tried to modify the build script for the newest version of virtualbox, but I'm obviously not smart enough :P (It doesn't seem to have qt3 either, so I don't know if I will be able to compile it anyway without installing qt4, which I don't want).

Are there any suggestions out there?
 
Old 06-16-2009, 06:31 AM   #2
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,157
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
It's not a kernel version problem. For me it works (VBox 2.2.4-47978) with the new 2.6.30
Are you sure that the directory /usr/lib/virtualbox/src/vboxdrv exists and it's not a permissions problem?
 
Old 06-16-2009, 06:42 AM   #3
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Original Poster
Rep: Reputation: 59
Well, it didn't exist. But I created the folders (I were missing both src and src/vboxdrv/) and also the build_in_tmp. When I ran rc.vboxdrv, I got permission denied, so I made the last file executable. Then I got the same error for another directory, /usr/lib/virtualbox/src/vboxnetflt/build_in_tmp. I did the same there, and I am perhaps a little closer.

When I run rc.vboxdrv now, I get this message:

Starting VirtualBox kernel module ...failed!
(No suitable module for running kernel found)

I tried, yet again, to recompile the virtualbox-kernel package from slackbuild (Some desperate attempt to get it working :P). But there were no difference.
 
Old 06-16-2009, 07:25 AM   #4
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,157
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
Run
Code:
/etc/rc.d/rc.vboxdrv setup
to recompile the driver prior trying to start Vbox
Or better yet, first uninstall it
Code:
./VirtualBox-x.y.z.run uninstall
and then try reinstall it
 
Old 06-16-2009, 07:39 AM   #5
bloodsugar
Member
 
Registered: May 2009
Posts: 36

Rep: Reputation: 18
I had permissions problems (and some other problems, if I remember) with the 12.1 virtualbox slackbuild from slackbuilds.org.

In the end I downloaded the 'all distributions i386.run' from the offical website, and it worked.

Last edited by bloodsugar; 06-16-2009 at 07:46 AM.
 
Old 06-16-2009, 09:49 AM   #6
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
If you are running 2.6.30 and rebuild the kernel-package by using the SlackBuild, I guess it should work fine (after installing/upgrading of course).
If you get an error, can you post it here?

The other issue with the non-existent paths I already know about. It's not really something serious though. The init-script just tries to do the same as I suggested above.
If you are sure the new module is installed, try to modprobe it manually and/or look at the dmesg output.
 
Old 06-16-2009, 09:50 AM   #7
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Original Poster
Rep: Reputation: 59
I guess I _could_ use a binary installer, but I'm more interested in fixing it. I feel I have more control when I use packages rather then binary installers. Oh well, I'm at work now, so I guess I'll have to look at it some other time.
 
Old 06-16-2009, 10:09 AM   #8
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by ppr:kut View Post
If you are running 2.6.30 and rebuild the kernel-package by using the SlackBuild, I guess it should work fine (after installing/upgrading of course).
If you get an error, can you post it here?

The other issue with the non-existent paths I already know about. It's not really something serious though. The init-script just tries to do the same as I suggested above.
If you are sure the new module is installed, try to modprobe it manually and/or look at the dmesg output.
Well. I've tried that already and all errors I've got is posted above. I read trough /etc/rc.vboxdrv and the setup section. It looks to me that the scripts that were missing that I created are scripts to build new kernel modules.

Code:
BUILDVBOXDRV="$INSTALL_DIR/src/vboxdrv/build_in_tmp"
BUILDVBOXNETFLT="$INSTALL_DIR/src/vboxnetflt/build_in_tmp"

<SNIPP>

setup()
{
    stop
    if find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|grep -q vboxnetflt; then
        begin_msg "Removing old VirtualBox netflt kernel module"
        find /lib/modules/`uname -r` -name "vboxnetflt\.*" 2>/dev/null|xargs rm -f 2>/dev/null
        succ_msg
    fi
    if find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|grep -q vboxdrv; then
        begin_msg "Removing old VirtualBox kernel module"
        find /lib/modules/`uname -r` -name "vboxdrv\.*" 2>/dev/null|xargs rm -f 2>/dev/null
        succ_msg
    fi
    begin_msg "Recompiling VirtualBox kernel module"
    if ! $BUILDVBOXDRV \
        --save-module-symvers /tmp/vboxdrv-Module.symvers \
        --no-print-directory install > $LOG 2>&1; then
        failure "Look at $LOG to find out what went wrong"
    fi
    if ! $BUILDVBOXNETFLT \
        --use-module-symvers /tmp/vboxdrv-Module.symvers \
        --no-print-directory install >> $LOG 2>&1; then
        failure "Look at $LOG to find out what went wrong"
    fi
    rm -f /etc/vbox/module_not_compiled
    succ_msg
    start
}
The full debug information I get when I run /etc/rc.d/rc.vboxdrv setup is:
Stopping VirtualBox kernel module ...done.
Recompiling VirtualBox kernel module ...done.
Starting VirtualBox kernel module ...failed!
(No suitable module for running kernel found)

Which suggest (to me at least) that the setup section is executed alright.

(How does Windows users manage without SSH? :P)

[EDIT]
So, if someone got a copy of
src/vboxdrv/build_in_tmp
and
src/vboxnetflt/build_in_tmp

I would love to have them, so I could test if that works.

Last edited by Dinithion; 06-16-2009 at 10:11 AM.
 
Old 06-16-2009, 01:45 PM   #9
botnet
Member
 
Registered: May 2009
Posts: 158

Rep: Reputation: 40
I also have a problem with virtualbox and kernel 2.6.30, although not the same as yours.

This is the error I get when building the vboxnetflt module:
Code:
/tmp/vbox.1/linux/VBoxNetFlt-linux.c: In function 'vboxNetAdpNetDevInit':
/tmp/vbox.1/linux/VBoxNetFlt-linux.c:225: error: 'struct net_device' has no member named 'open'
/tmp/vbox.1/linux/VBoxNetFlt-linux.c:226: error: 'struct net_device' has no member named 'stop'
/tmp/vbox.1/linux/VBoxNetFlt-linux.c:227: error: 'struct net_device' has no member named 'hard_start_xmit'
/tmp/vbox.1/linux/VBoxNetFlt-linux.c:228: error: 'struct net_device' has no member named 'get_stats'
make[2]: *** [/tmp/vbox.1/linux/VBoxNetFlt-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.1] Error 2
make: *** [vboxnetflt] Error 2
I looked through google, but found no resolution. There is a post with someone having the same problem, but their steps to solve the issue were not successful for me.

The vboxdrv module builds fine, and I can start VM's as long as I turn off networking.

I am using the latest binary from sun's website.

Last edited by botnet; 06-16-2009 at 01:46 PM.
 
Old 06-16-2009, 02:05 PM   #10
bathory
LQ Guru
 
Registered: Jun 2004
Location: Piraeus
Distribution: Slackware
Posts: 13,157
Blog Entries: 1

Rep: Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021Reputation: 2021
@Dinithion

Find attached the 2 build_in_tmp files from the VirtualBox-2.2.4-47978-Linux_x86.run binary (just rename them accordingly).
Hope that they'll do.

@botnet
Check if you have set "CONFIG_COMPAT_NET_DEV_OPS" in your kernel configuration.
Quote:
CONFIG_COMPAT_NET_DEV_OPS
"This option enables kernel compatiability with older network devices that do not use net_device_ops interface." "This option enables kernel compatiability with older network devices that do not use net_device_ops interface."
It seems that "vboxnet0 (): not using net_device_ops yet" if I can understand well this post, translated from hungarian!!!
Attached Files
File Type: txt vboxdrv_build_in_tmp.txt (3.3 KB, 12 views)
File Type: txt vboxnetflt_build_in_tmp.txt (3.3 KB, 15 views)

Last edited by bathory; 06-16-2009 at 02:53 PM.
 
Old 06-16-2009, 05:30 PM   #11
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
Quote:
The full debug information I get when I run /etc/rc.d/rc.vboxdrv setup is
Well, that is exactly what I wanted you not to do. I see the reason for a kernel module setup being in the init-script as part of the binary package (it's convenient), but it's totally out of place in the ose-version. I see no reason a init-script should in any way handle kernel module compilation.
Use the virtualbox-kernel.SlackBuild from slackbuilds.org (http://slackbuilds.org/repository/12...ualbox-kernel/), and install the generated package. It should work afterwards. If something in this chain does not work, I am interested to see the errors, as that is the part I can fix more easily.
 
Old 06-16-2009, 08:24 PM   #12
botnet
Member
 
Registered: May 2009
Posts: 158

Rep: Reputation: 40
bathory, thanks, that was it.
 
Old 06-17-2009, 04:25 AM   #13
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Original Poster
Rep: Reputation: 59
Quote:
Originally Posted by ppr:kut View Post
Well, that is exactly what I wanted you not to do. I see the reason for a kernel module setup being in the init-script as part of the binary package (it's convenient), but it's totally out of place in the ose-version. I see no reason a init-script should in any way handle kernel module compilation.
Use the virtualbox-kernel.SlackBuild from slackbuilds.org (http://slackbuilds.org/repository/12...ualbox-kernel/), and install the generated package. It should work afterwards. If something in this chain does not work, I am interested to see the errors, as that is the part I can fix more easily.
D'oh. I was about to say you weren't reading my post, as I've said i rebuild the package twice. Turns out I wasn't reading yours.

I agree that building a kernel module is not a job for the init-script. This whole thing is a little confusing, I must say. Why bother have the function if it isn't working. I've tried rebuilding the package several times now, and it never worked. For some reason I thought I had to run /etc/rc.d/rc.vboxdrv setup first to build a module, then rc.vboxdrv start. I don't know why, but running this setup deletes the kernel module produced by the slackbuild, then tries to build a new, it fails, and therefor it doesn't work to run 'start' after 'setup'. I wonder why they delete the old one, before it has succeeded in building a new one.

Thanks alot for your patience
 
Old 06-17-2009, 04:35 AM   #14
ppr:kut
Slackware Contributor
 
Registered: Aug 2006
Location: Netherlands
Distribution: Slackware
Posts: 631

Rep: Reputation: 463Reputation: 463Reputation: 463Reputation: 463Reputation: 463
Quote:
D'oh. I was about to say you weren't reading my post, as I've said i rebuild the package twice. Turns out I wasn't reading yours.
Such things can happen

Quote:
agree that building a kernel module is not a job for the init-script. This whole thing is a little confusing, I must say. Why bother have the function if it isn't working. I've tried rebuilding the package several times now, and it never worked. For some reason I thought I had to run /etc/rc.d/rc.vboxdrv setup first to build a module, then rc.vboxdrv start. I don't know why, but running this setup deletes the kernel module produced by the slackbuild, then tries to build a new, it fails, and therefor it doesn't work to run 'start' after 'setup'. I wonder why they delete the old one, before it has succeeded in building a new one.
"rc.vboxdrv setup" not working is partially my fault, because I didn't put the kernel module source in /usr/lib, but /usr/src. It should be as easy as fixing the path in the init-script. I still see no point in putting the kernel module source somewhere else then /usr/src though.

I will fix this with the next update of VirtualBox on SBo.
 
Old 06-17-2009, 05:04 AM   #15
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Original Poster
Rep: Reputation: 59
Heh, I didn't realize until now that you're actually the maintainer of the package :P

Well, it works now, and hopefully others will benefit from this as well. I never would have found this out by my self. Not in a long while at least. Probably I would have gone with with the binary after a few more days of searching and scratching my head. Thanks again

Last edited by Dinithion; 06-17-2009 at 05:06 AM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
New current kernel 2.6.29.1 on VirtualBox bgeddy Slackware 5 04-15-2009 07:27 PM
Virtualbox kernel modules won't load after updating kernel in openSUSE 11.0 JamesHall SUSE / openSUSE 6 02-03-2009 04:36 PM
virtualbox kernel donsimak Linux - Kernel 1 12-18-2008 01:05 AM
virtualbox kernel Brian H Linux - Newbie 14 08-26-2008 05:47 AM
Cannot run Virtualbox in Custom Kernel davcefai Debian 7 05-28-2008 11:29 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Slackware

All times are GMT -5. The time now is 01:27 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration