Saturday, 24 April 2010

Version Check: Virtualbox on Lubuntu

It's nearly always the random-bug-generator sat in front of the keyboard!

I nearly gave myself a bad day when I failed to get either Virtualbox OSE or the Sun-Oracle Virtualbox Free version working in Lubuntu. It wasn't anyone else's fault, I inadvertentaly got myself stuck in the half-way house between Lubuntu versions...

Installing Virtualbox, I got stuck in a rut with:
Compilation of the kernel module FAILED! VirtualBox will not start until this problem is fixed. Please consult /var/log/vbox-install.log to find out why the kernel module does not compile. Most probably the kernel sources are not found. Install them and execute
  /etc/init.d/vboxdrv setup
as root.
or
The VirtualBox Linux kernel driver (vboxdrv) is either not loaded or there is a permission problem with /dev/vboxdrv. Re-setup the kernel module by executing
'/etc/init.d/vboxdrv setup'
or
Stopping VirtualBox kernel module done 
Recompiling VirtualBox kernel module failed
(Look at /var/log/vbox-install.log to find out what went wrong)
On inspecting /var/log/vbox-install.log, I find:
Makefile:166: *** Error: unable to find the include directory for your current Linux kernel. Specify KERN_INCL= and run Make again. Stop.
or  simply:
Kernel driver not installed (rc=-1908)
Carrying out a
uname -r 
informed me I was running kernel version 2.6.32.17-generic.

I had installed DKMS, GCC, build-essential, so that end of things for compiling a Virtualbox kernel was covered. However,
sudo apt-get install linux-headers-2.6.32.17-generic
Got stuck. It didn't exist. After looking around at repos for a kernel update, then looking at Virtualbox solutions which were more and more complex, I realised the linux-headers in the repos were all higher versions than my 2.6.32.17. No headers, no compiling of Virtualbox!

I was still on Beta-1 Lubuntu. The solution was simple.

sudo apt-get update
sudo apt-get dist-upgrade
sudo apt-get autoclean

Get the Beta-2 release, update the kernel version with the matching linux-headers and try again. Doh!!!

Installing Virtualbox for debian lenny 3.1.3.6-r59338, it ran straight in (I'm using this and NOT vbox-ose from the repositories as the OSE version does not support USB devices).

Virtualbox now works, extraordinarily quickly and the Install Guest Additions option works natively within Virtualbox without any intervention from me - better than on Lucid.  RC

5 comments:

  1. interesting... how quickly do you get from boot-up to a running virtualbox?

    ReplyDelete
  2. Trying to install with final Lubuntu but having problems. Have you tested this?

    ReplyDelete
  3. I have found with final Lubuntu release that the now available Virtualbox for 10.04 (3.1.8-61349 lucid) installed well after others failed. I did run apt-get update, dist-upgrade & autoclean, though do not know if it was required. Thanks for your work and comments!

    ReplyDelete
  4. OK, as of this AM, 11May, upgraded to Lubuntu 10.04 final and Sun Virtualbox 3.1.8 r61349, its all working fine. Bearing in mind the trouble I had with kernel and header versions, upgrade, purge and reboot before trying V-Box is never a bad thing.

    This is on the elderly Compaq Evo, Pentium Mobile 1Gb ram and my Windows 2000 VM takes about 58seconds from power-up to desktop in 256mb v-ram.

    Glad you got things working. RC

    ReplyDelete
  5. Thanks for this. Got recent version of VirtualBox running on more recent version of Lubuntu with the help of your post and this forum thread:
    http://ubuntuforums.org/showthread.php?t=1163811

    ReplyDelete

At least try to be nice, it won't kill you...