Strange Virtualbox problem

You have a problem with Salix? Post here and we'll do what we can to help.
impatiens
Posts: 18
Joined: 17. Jul 2012, 23:09

Strange Virtualbox problem

Post by impatiens »

I want to be able to use Virtualbox to run my Windows XP VM and test a few possible setups for my older laptop. But I've never been able to get it to successfully run a VM. The warning about the vboxdrv module has always showed up, and the given command never worked. Modprobe cannot find vboxdrv at all. Virtualbox used to at least start up, but now it doesn't.

Here's what happens when I reinstall Virtualbox and try to run it:

Code: Select all

root[impatiens]# sh VirtualBox-4.1.18-78361-Linux_amd64.run
Verifying archive integrity... All good.
Uncompressing VirtualBox for Linux installation...........
VirtualBox Version 4.1.18 r78361 (2012-06-20T09:49:33Z) installer
Removing previous installation of VirtualBox 4.1.18 r78361 from /opt/VirtualBox
Installing VirtualBox to /opt/VirtualBox
Python found: python, installing bindings...
Building the VirtualBox kernel modules

VirtualBox has been installed successfully.

You will find useful information about using VirtualBox in the user manual
  /opt/VirtualBox/UserManual.pdf
and in the user FAQ
  http://www.virtualbox.org/wiki/User_FAQ

We hope that you enjoy using VirtualBox.

root[impatiens]# virtualbox
WARNING: The vboxdrv kernel module is not loaded. Either there is no module
         available for the current kernel (3.3.6) or it failed to
         load. Please recompile the kernel module and install it by

           sudo /etc/init.d/vboxdrv setup

         You will not be able to start VMs until this problem is fixed.
/usr/bin/virtualbox: line 83: /opt/VirtualBox/VirtualBox: No such file or directory
/usr/bin/virtualbox: line 83: /opt/VirtualBox/VirtualBox: Success
root[impatiens]# sudo /etc/init.d/vboxdrv setup
sudo: /etc/init.d/vboxdrv: command not found
I haven't touched /opt/VirtualBox at all. At start-up, I also get a warning about vboxdrv failing to load. Is there something glaringly obvious I'm not doing?

Incidentally, I've tried to install VMWare Player, too, to see if that worked better. The 64-bit one wouldn't run, claiming I have the wrong architecture, despite uname telling me I have a 64-bit system. The 32-bit version tries to install, but fails for reasons it won't tell me.
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: Strange Virtualbox problem

Post by Akuna »

impatiens wrote:

Code: Select all

root[impatiens]# sudo /etc/init.d/vboxdrv setup
Since you are already logged as root, there is no need to use sudo (which anyways does not get used in Salix/Slackware the same way as in Ubuntu).
Instead you can directly issue:

Code: Select all

/etc/init.d/vboxdrv setup
Image
What really matters is where you are going, not where you come from.
impatiens
Posts: 18
Joined: 17. Jul 2012, 23:09

Re: Strange Virtualbox problem

Post by impatiens »

You're right. I don't have to do that. Duh. But the command still fails.

Code: Select all

root[impatiens]# /etc/init.d/vboxdrv setup
bash: /etc/init.d/vboxdrv: No such file or directory
djemos
Salix Warrior
Posts: 1433
Joined: 29. Dec 2009, 13:45
Location: Greece

Re: Strange Virtualbox problem

Post by djemos »

vboxdrv is in

Code: Select all

/etc/rc.d/rc.vboxdrv
Also look at /etc/rc.d/rc.local

Code: Select all

# Start vboxdrv
# If you do not wish this to be executed here then comment it out,
# and the installer will skip it next time.
if [ -x /etc/rc.d/rc.vboxdrv ]; then
    /etc/rc.d/rc.vboxdrv start
fi

# Start vboxballoonctrl-service
# If you do not wish this to be executed here then comment it out,
# and the installer will skip it next time.
if [ -x /etc/rc.d/rc.vboxballoonctrl-service ]; then
    /etc/rc.d/rc.vboxballoonctrl-service start
fi

# Start vboxweb-service
# If you do not wish this to be executed here then comment it out,
# and the installer will skip it next time.
if [ -x /etc/rc.d/rc.vboxweb-service ]; then
    /etc/rc.d/rc.vboxweb-service start
fi
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: Strange Virtualbox problem

Post by Akuna »

impatiens wrote:You're right. I don't have to do that. Duh. But the command still fails.

Code: Select all

root[impatiens]# /etc/init.d/vboxdrv setup
bash: /etc/init.d/vboxdrv: No such file or directory
Yes again this is generic instructions for *buntus type distro... (I should have looked closer)
try instead:

Code: Select all

/etc/rc.d/rc.vboxdrv setup
Image
What really matters is where you are going, not where you come from.
impatiens
Posts: 18
Joined: 17. Jul 2012, 23:09

Re: Strange Virtualbox problem

Post by impatiens »

Thanks, djemos and Akuna. I ran /etc/rc.d/rc.vboxdrv setup instead, so this is what happened:

Code: Select all

root[impatiens]# /etc/rc.d/rc.vboxdrv setup
Stopping VirtualBox kernel modules ...done.
Uninstalling old VirtualBox DKMS kernel modules ...done.
Trying to register the VirtualBox kernel modules using DKMS ...failed!
  (Failed, trying without DKMS)
Recompiling VirtualBox kernel modules ...failed!
  (Look at /var/log/vbox-install.log to find out what went wrong)
So, I go over to check the log and find this:

Code: Select all

Makefile:175: 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 SUBDIRS=/tmp/vbox.0 SRCROOT=/tmp/vbox.0 CONFIG_MODULE_SIG= -C /usr/src/linux modules
test -e include/generated/autoconf.h -a -e include/config/auto.conf || (		\
	echo;								\
	echo "  ERROR: Kernel configuration is invalid.";		\
	echo "         include/generated/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.33.4/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/lib/gcc/i486-slackware-linux/4.4.4/include -I/usr/src/linux-2.6.33.4/arch/x86/include -Iinclude  -include include/generated/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 -Os -m32 -msoft-float -mregparm=3 -freg-struct-return -mpreferred-stack-boundary=2 -march=i686 -mtune=core2 -mtune=generic -Wa,-mtune=generic32 -ffreestanding -DCONFIG_AS_CFI=1 -DCONFIG_AS_CFI_SIGNAL_FRAME=1 -pipe -Wno-sign-compare -fno-asynchronous-unwind-tables -mno-sse -mno-mmx -mno-sse2 -mno-3dnow -Wframe-larger-than=2048 -fno-stack-protector -fno-omit-frame-pointer -fno-optimize-sibling-calls -Wdeclaration-after-statement -Wno-pointer-sign -fno-strict-overflow -fno-dwarf2-cfi-asm -fconserve-stack -include /tmp/vbox.0/include/VBox/SUPDrvMangling.h -I/usr/src/linux/include -I/tmp/vbox.0/ -I/tmp/vbox.0/include -I/tmp/vbox.0/r0drv/linux -I/tmp/vbox.0/vboxdrv/ -I/tmp/vbox.0/vboxdrv/include -I/tmp/vbox.0/vboxdrv/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)"  -c -o /tmp/vbox.0/linux/SUPDrv-linux.o /tmp/vbox.0/linux/SUPDrv-linux.c
In file included from /tmp/vbox.0/include/VBox/types.h:30,
                 from /tmp/vbox.0/linux/../SUPDrvInternal.h:35,
                 from /tmp/vbox.0/linux/SUPDrv-linux.c:31:
/tmp/vbox.0/include/iprt/types.h:220: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘uint128_t’
/tmp/vbox.0/include/iprt/types.h:239: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or ‘__attribute__’ before ‘int128_t’
/tmp/vbox.0/include/iprt/types.h:394: error: expected specifier-qualifier-list before ‘uint128_t’
In file included from /tmp/vbox.0/include/iprt/cpuset.h:31,
                 from /tmp/vbox.0/include/VBox/sup.h:33,
                 from /tmp/vbox.0/linux/../SUPDrvInternal.h:37,
                 from /tmp/vbox.0/linux/SUPDrv-linux.c:31:
/tmp/vbox.0/include/iprt/asm.h: In function ‘ASMAtomicXchgPtr’:
/tmp/vbox.0/include/iprt/asm.h:525: warning: cast from pointer to integer of different size
/tmp/vbox.0/include/iprt/asm.h:525: warning: cast to pointer from integer of different size
/tmp/vbox.0/include/iprt/asm.h: In function ‘ASMAtomicXchgR0Ptr’:
/tmp/vbox.0/include/iprt/asm.h:580: warning: cast from pointer to integer of different size
/tmp/vbox.0/include/iprt/asm.h:580: warning: cast to pointer from integer of different size
/tmp/vbox.0/include/iprt/asm.h: In function ‘ASMAtomicCmpXchgPtrVoid’:
/tmp/vbox.0/include/iprt/asm.h:937: warning: cast from pointer to integer of different size
/tmp/vbox.0/include/iprt/asm.h:937: warning: cast from pointer to integer of different size
/tmp/vbox.0/include/iprt/asm.h: In function ‘ASMAtomicCmpXchgExPtrVoid’:
/tmp/vbox.0/include/iprt/asm.h:1293: warning: cast from pointer to integer of different size
/tmp/vbox.0/include/iprt/asm.h:1293: warning: cast from pointer to integer of different size
/tmp/vbox.0/include/iprt/asm.h: In function ‘ASMAtomicReadPtr’:
/tmp/vbox.0/include/iprt/asm.h:1805: warning: cast to pointer from integer of different size
/tmp/vbox.0/include/iprt/asm.h: In function ‘ASMAtomicUoReadPtr’:
/tmp/vbox.0/include/iprt/asm.h:1846: warning: cast to pointer from integer of different size
/tmp/vbox.0/include/iprt/asm.h: In function ‘ASMAtomicWritePtrVoid’:
/tmp/vbox.0/include/iprt/asm.h:2232: warning: cast from pointer to integer of different size
make[2]: *** [/tmp/vbox.0/linux/SUPDrv-linux.o] Error 1
make[1]: *** [_module_/tmp/vbox.0] Error 2
make: *** [vboxdrv] Error 2
And /etc/rc.d/rc.local seems to match, unless there's something I'm not noticing:

Code: Select all

#!/bin/sh
#
# /etc/rc.d/rc.local:  Local system initialization script.
#
# Put any local startup commands in here.  Also, if you have
# anything that needs to be run at shutdown time you can
# make an /etc/rc.d/rc.local_shutdown script and put those
# commands in there.

# Start vboxdrv
# If you do not wish this to be executed here then comment it out,
# and the installer will skip it next time.
if [ -x /etc/rc.d/rc.vboxdrv ]; then
    /etc/rc.d/rc.vboxdrv start
fi

# Start vboxballoonctrl-service
# If you do not wish this to be executed here then comment it out,
# and the installer will skip it next time.
if [ -x /etc/rc.d/rc.vboxballoonctrl-service ]; then
    /etc/rc.d/rc.vboxballoonctrl-service start
fi

# Start vboxweb-service
# If you do not wish this to be executed here then comment it out,
# and the installer will skip it next time.
if [ -x /etc/rc.d/rc.vboxweb-service ]; then
    /etc/rc.d/rc.vboxweb-service start
fi
ETA: Wait, I'm using Shador's updated kernel. I think that leaves the original intact. Is VirtualBox looking at the wrong kernel? Is that part of the problem?
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: Strange Virtualbox problem

Post by Akuna »

did you install the kernel-source package that match your actual kernel version?
Image
What really matters is where you are going, not where you come from.
User avatar
gapan
Salix Wizard
Posts: 6244
Joined: 6. Jun 2009, 17:40

Re: Strange Virtualbox problem

Post by gapan »

Run

Code: Select all

# slapt-get -i kernel-source
first.
Image
Image
User avatar
laprjns
Salix Warrior
Posts: 1105
Joined: 28. Aug 2009, 01:30
Location: Connecticut USA

Re: Strange Virtualbox problem

Post by laprjns »

Did you install the kernel-source for Shador's kernel?
“Don’t you see that the whole aim of Newspeak is to narrow the range of thought?"
User avatar
Akuna
Salix Wizard
Posts: 1038
Joined: 14. Jun 2009, 12:25

Re: Strange Virtualbox problem

Post by Akuna »

gapan wrote:Run

Code: Select all

# slapt-get -i kernel-source
first.
Yes, if you were running Salix standard kernel which does not seem to be the case here.
If you are using Shador's kernel, do install Shador's kernel-source package instead, not the one in Salix repository.
Image
What really matters is where you are going, not where you come from.
Post Reply