Author Topic: Installing VirtualBox to run under Zentyal  (Read 9480 times)

Andrew

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Installing VirtualBox to run under Zentyal
« on: April 08, 2011, 05:18:57 pm »
Hello,

I'm trying to install VirtualBox to run under Zentyal 2.0.17.

What I have tried so far is getting the .deb for Ubuntu 10.04 and then installing with dpkg.

First, I ran into some missing packages. I installed them through apt-get and then proceeded to try and install VirtualBox again.

The final result was:

 * Stopping VirtualBox kernel modules                                    [ OK ]
 * Uninstalling old VirtualBox DKMS kernel modules                       [ OK ]
 * Trying to register the VirtualBox kernel modules using DKMS                 
 * Failed, trying without DKMS
 * Recompiling VirtualBox kernel modules                                       
 * Look at /var/log/vbox-install.log to find out what went wrong


And this is in vbox-install.log:

Makefile:167: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.

Should I specify the Zentyal's kernel directory when installing VirtualBox? In that case, what is Zentyal's kernel directory? Is it safe to proceed this way?

Any assistance would be appreciated.

Best regards

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: Installing VirtualBox to run under Zentyal
« Reply #1 on: April 08, 2011, 08:45:47 pm »
Apt-get install build-essential  linux-source.
« Last Edit: April 10, 2011, 07:02:46 pm by half_life »

Andrew

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Installing VirtualBox to run under Zentyal
« Reply #2 on: April 11, 2011, 03:12:48 pm »
Hello,

Thank you for replying. I have done as told and I'm still getting the same message:


root@zentyal:/home/administrator/Downloads# dpkg -i virtualbox-4.0_4.0.4-70112~Ubuntu~lucid_amd64.deb
Selecting previously deselected package virtualbox-4.0.
(Reading database ... 76206 files and directories currently installed.)
Unpacking virtualbox-4.0 (from virtualbox-4.0_4.0.4-70112~Ubuntu~lucid_amd64.deb) ...
Setting up virtualbox-4.0 (4.0.4-70112~Ubuntu~lucid) ...
addgroup: The group `vboxusers' already exists as a system group. Exiting.
update-rc.d: warning: vboxdrv stop runlevel arguments (0 1 6) do not match LSB Default-Stop values (1)
 * Stopping VirtualBox kernel modules                                    [ OK ]
 * Uninstalling old VirtualBox DKMS kernel modules                       [ OK ]
 * Trying to register the VirtualBox kernel modules using DKMS                 
 * Failed, trying without DKMS
 * Recompiling VirtualBox kernel modules                                       
 * Look at /var/log/vbox-install.log to find out what went wrong

Processing triggers for ureadahead ...
Processing triggers for shared-mime-info ...
Processing triggers for desktop-file-utils ...
Processing triggers for hicolor-icon-theme ...
Processing triggers for python-central ...

root@zentyal:/home/administrator/Downloads# cat /var/log/vbox-install.log

Makefile:167: *** Error: unable to find the sources of your current Linux kernel. Specify KERN_DIR=<directory> and run Make again.  Stop.
root@zentyal:/home/administrator/Downloads#

Any tips?

Thanks in advance!

Andrew

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Installing VirtualBox to run under Zentyal
« Reply #3 on: April 11, 2011, 03:33:56 pm »
I have extracted the .tar kernel in /usr/src.

If I leave it in /usr/src/linux-source-2.6.32 and run vbox setup, I get the previous error (source files not found).

If I rename the directory to /usr/src/linux, I get the attached error log file, that includes:

 ERROR: Kernel configuration is invalid.
         include/linux/autoconf.h or include/config/auto.conf are missing.
         Run 'make oldconfig && make prepare' on kernel src to fix it.

I therefore ran: make oldconfig && make prepare

And got: make: *** No rule to make target `oldconfig'.  Stop.

Any advice, please?

Thank you

half_life

  • Bug Hunter
  • Zen Hero
  • *****
  • Posts: 867
  • Karma: +59/-0
    • View Profile
Re: Installing VirtualBox to run under Zentyal
« Reply #4 on: April 12, 2011, 01:46:16 am »
Copy /boot/config- (highest version that is there) /usr/src/linux/.config.  This is the config file used to compile the current kernel you are using.

Andrew

  • Zen Apprentice
  • *
  • Posts: 6
  • Karma: +0/-0
    • View Profile
Re: Installing VirtualBox to run under Zentyal
« Reply #5 on: April 12, 2011, 05:27:25 pm »
Thank you. I tried that but got a kernel version error.

However, I was able to get it running doing the following:

- Adding the repository:
deb http://download.virtualbox.org/virtualbox/debian lucid contrib non-free

- Getting the key and updating:
wget http://download.virtualbox.org/virtualbox/debian/oracle_vbox.asc
sudo apt-key add oracle_vbox.asc
sudo apt-get update

- Installing linux headers and finally virtualbox:
sudo apt-get install linux-headers-2.6.32-24-generic
sudo apt-get install virtualbox-4.0

Cheers