Page 1 of 2 12 LastLast
Results 1 to 10 of 12

Thread: How recompile VirtualBox for my kernel version?

  1. #1

    Default How recompile VirtualBox for my kernel version?

    VirtualBox failed with the message that it needs to be recompiled for my kernel version. How would I do this? Where do i get the headers/etc needed to do this? (When I look in YAST, I don't see kernel-headers or kernel-devel)

    My kernel version: Linux 2.6.27.37-0.1-default i686

  2. #2
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: How recompile VirtualBox for my kernel version?

    install kernel source

    run as root on console: /etc/init.d/vboxdrv setup

  3. #3

    Default Re: How recompile VirtualBox for my kernel version?

    Quote Originally Posted by microchip8 View Post
    install kernel source

    run as root on console: /etc/init.d/vboxdrv setup
    help!

    I did that and now I can't run virtual box! I keep getting permission denied errors!

  4. #4

    Default Re: How recompile VirtualBox for my kernel version?

    I figured it out. had to run:
    sudo chmod +x /usr/lib/virtualbox/VirtualBox

  5. #5

    Default Re: How recompile VirtualBox for my kernel version?

    Also you have to be in vboxdrv group.
    My Blog: http://pdg86.wordpress.com
    Arch Linux / openSUSE 11.2 / Slackware-Current

  6. #6

    Default Re: How recompile VirtualBox for my kernel version?

    Quote Originally Posted by sHyLoCk View Post
    Also you have to be in vboxdrv group.
    Oddly enough, no. I checked because I thought that was the error but nope. I'm not a member of that group, in fact that group was never created and yet everything works.

  7. #7

    Default Re: How recompile VirtualBox for my kernel version?

    Hi,

    I can't make the module. I have done a make oldconfig and make prepare

    I get

    ginger2:/usr/src/linux-2.6.31.5-0.1# make oldconfig
    scripts/kconfig/conf -o arch/x86/Kconfig
    #
    # configuration written to .config
    #
    ginger2:/usr/src/linux-2.6.31.5-0.1 # make prepare
    scripts/kconfig/conf -s arch/x86/Kconfig
    CHK include/linux/version.h
    CHK include/linux/utsrelease.h
    SYMLINK include/asm -> arch/x86/include/asm
    CALL scripts/checksyscalls.sh

    But /etc/init.d/vboxdrv setup
    gives me

    Stopping VirtualBox kernel module done
    Recompiling VirtualBox kernel module failed
    (Look at /var/log/vbox-install.log to find out what went wrong)

    And the log file mentioned contains:

    Makefile:150: Warning: using /usr/src/linux as the source directory of your Linux kernel. If this is not correct, specify KERN_DIR=<directory> and run Make again.
    make KBUILD_VERBOSE=1 -C /usr/src/linux SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 modules
    test -e include/linux/autoconf.h -a -e include/config/auto.conf || ( \
    echo; \
    echo " ERROR: Kernel configuration is invalid."; \
    echo " include/linux/autoconf.h or include/config/auto.conf are missing."; \
    echo " Run 'make oldconfig && make prepare' on kernel src to fix it."; \
    echo; \
    /bin/false)
    mkdir -p /tmp/vbox.0/.tmp_versions ; rm -f /tmp/vbox.0/.tmp_versions/*

    WARNING: Symbol version dump /usr/src/linux-2.6.31.5-0.1/Module.symvers
    is missing; modules will have no dependencies and modversions.

    make -f scripts/Makefile.build obj=/tmp/vbox.0
    gcc -Wp,-MD,/tmp/vbox.0/linux/.SUPDrv-linux.o.d -nostdinc -isystem /usr/lib64/gcc/x86_64-suse-linux/4.4/include -Iinclude -I/usr/src/linux-2.6.31.5-0.1/arch/x86/include -include include/linux/autoconf.h -D__KERNEL__ -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs -fno-strict-aliasing -fno-common -Werror-implicit-function-declaration -Wno-format-security -fno-delete-null-pointer-checks -O2 -m64 -mtune=generic -mno-red-zone -mcmodel=kernel -funit-at-a-time -maccumulate-outgoing-args -fstack-protector -fstack-protector-all -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -fno-omit-frame-pointer -fno-optimize-sibling-calls -fasynchronous-unwind-tables -g -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -I/usr/src/linux/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -D__KERNEL__ -DMODULE -DRT_OS_LINUX -DIN_RING0 -DIN_RT_R0 -DIN_SUP_R0 -DVBOX -DRT_WITH_VBOX -DVBOX_WITH_HARDENING -DCONFIG_VBOXDRV_AS_MISC -DRT_ARCH_AMD64 -DVBOX_WITH_64_BITS_GUESTS -DMODULE -D"KBUILD_STR(s)=#s" -D"KBUILD_BASENAME=KBUILD_STR(SUPDrv_linux)" -D"KBUILD_MODNAME=KBUILD_STR(vboxdrv)" -D"DEBUG_HASH=27" -D"DEBUG_HASH2=27" -c -o /tmp/vbox.0/linux/.tmp_SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
    /bin/sh: scripts/genksyms/genksyms: No such file or directory
    make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
    make[1]: *** [_module_/tmp/vbox.0] Error 2
    make: *** [vboxdrv] Error 2


    Any ideas anyone?

  8. #8
    Join Date
    Jun 2008
    Location
    /dev/belgium
    Posts
    1,946

    Default Re: How recompile VirtualBox for my kernel version?

    cp -f /boot/config-$(uname -r) /usr/src/linux/.config
    cd /usr/src/linux
    make prepare
    make modules_prepare

  9. #9

    Default Re: How recompile VirtualBox for my kernel version?

    I also had to install kernel-desktop-devel. Now it works.

    Thanks microchip8

  10. #10

    Default Re: How recompile VirtualBox for my kernel version?

    This link is helpful as well.

    virtualbox for openSUSE 11.2 (View topic) &bull; virtualbox.org

    Regards,
    WS

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •