Jump to content


HOWTO: Install VirtualBox


50 replies to this topic

#1 spode

    Member

  • Members
  • 27 posts

Posted 25 December 2007 - 06:14 PM

Installing VirtualBox isn't too hard to do. I'm using 512MB of RAM at the moment and running off a 32GB Corsair Flash drive. It works fine, albeit a little slowly. I have a 1GB DDR-2 stick waiting for me when I get home in the new year, and I'm hoping this should improve performance considerably.

Please note, that I've done this from memory – but when I get a chance I'll try this on a clean machine.

First things first, add the Xandros repos, as well as the VirtualBox repos. The xandros package from VirtualBox doesn't work – you need to use the debian etch package.

Open a terminal (CTRL+ALT+T) and then edit your apt sources list:

sudo nano /etc/apt/sources.list
Then add the following lines to the end of the file. Paste them in by pressing both mouse buttons together.

deb http://xnv4.xandros.com/xs2.0/upkg-srv2 etch main contrib non-free
deb http://www.VirtualBox.org/debian etch non-free
"CTRL+X" will quit – press y to save when asked.

Back at the console, we need to install the build-essential package, as we need to compile some kernel headers for VitualBox to use. This includes make etc.

sudo apt-get install build-essential
Next, we need to download the kernel source. At the time of writing, the EeePC uses 2.6.21.4. You can find out by running the following command in the console:

uname -r
The source can be found at http://www.kernel.or...ux/kernel/v2.6/

Download the source and place it in /usr/src/ - you may need to create this folder first.

sudo mkdir /usr/src
From the console, go to /usr/src and extract the source.

cd /usr/src
tar -xf ./linux-2.6.21.4.tar.gz
You then need to create a symbolic link, as the VirtualBox install program expects the source to be in /usr/src/linux.

sudo ln /usr/src/linux-2.6.21.4 /usr/src/linux -s
Now, we need to set up the build.

cd /usr/src/linux
sudo make oldconfig && sudo make prepare
Assuming all goes well, lets compile. As there are only a few things needed, you can cancel the build by pressing "CTRL + C" after as soon as you see "modpost" come up on the screen – for me this was after 10-15 seconds. If you have other applications that need headers, feel free to let it compile entirely – it took around 30 minutes when plugged into the mains.

sudo make all
Now, we should be able to install VirtualBox.

sudo apt-get install virtualbox
You'll find there are a couple of dependencies that will be installed from the Xandros repos.

Annoyingly, the VirtualBox service doesn't start when the computer does because of the way Xandros has been setup. There are two methods for this that spring to mind – method two is my preferred.

Method One

sudo nano /usr/sbin/services.sh
At the end of the file add:

/etc/init.d/vboxdrv start
/etc/init.d/vboxnet start
With this method, I have found you can't launch VirtualBox straight away, as it is last on the list it won't happen until the network etc. is up. Not ideal if you're impatient.

Method Two (Preferred)

With this method, we'll start the vbox services each time we launch VirtualBox, which also stops having the services unneccessarily loaded when we aren't using them.

Firstly, edit ourselves a new file for the script code to be in.

sudo nano /bin/vboxrun
And then paste the following code in, by pressing both mouse buttons together.

sudo /etc/init.d/vboxdrv start
sudo /etc/init.d/vboxnet start

/usr/bin/VirtualBox

sudo /etc/init.d/vboxdrv stop
sudo /etc/init.d/vboxnet stop
Then give this script execution rights.

sudo chmod +x /bin/vboxrun
Finally

Finally, we want to add this to the AsusLauncher, which is where my asusadd script comes in handy - http://forum.eeeuser...pic.php?id=6645

If you've followed method one, you can add this by running:

sudo asusadd Work VirtualBox /usr/bin/VirtualBox
Or for my preferred method two:

sudo asusadd Work VirtualBox /bin/vboxrun
Happy Virtualizing!

Edited by spode, 26 December 2007 - 12:36 AM.


#2 hawkfire

    Senior Member

  • Members
  • 103 posts
  • LocationOttawa, ON, Canada

Posted 05 January 2008 - 10:01 PM

How did you get around the problem that it wants to run as a user in the vbox group? I'm getting this error everytime I try start my VM:


The VirtualBox kernel driver is not accessible to the current user. Make sure that the user has write permissions for /dev/vboxdrv by adding them to the vboxusers groups. You will need to logout for the change to take effect..
VBox status code: -1909 (VERR_VM_DRIVER_NOT_ACCESSIBLE).


Result Code:
0x80004005
Component:
Console
Interface:
IConsole {1dea5c4b-0753-4193-b909-22330f64ec45}

#3 spode

    Member

  • Members
  • 27 posts

Posted 09 January 2008 - 03:47 PM

Oooh. I don't know how I missed that, but I added myself to the vboxusers group.

sudo usermod -a -G vboxusers user
I've not got 1GB of RAM in my EeePC and it's working quite nicely.

#4 hawkfire

    Senior Member

  • Members
  • 103 posts
  • LocationOttawa, ON, Canada

Posted 10 January 2008 - 05:52 PM

Actually, once I installed your ASUSAdd script, added the permissions, and ran it from Easy mode (using method Two), it looks like it is working fine. The nice thing is that I created the initial VBox image on an external drive from my EEE, connected it to my PC (with CD drive, etc), installed XP Home and all of the drivers on a normal sized screen, and now I can bring it back to my EEE to fine tune it.

#5 hawkfire

    Senior Member

  • Members
  • 103 posts
  • LocationOttawa, ON, Canada

Posted 11 January 2008 - 02:28 PM

Have you lost your mouse? I'm on the the default Linux, with an XPHome vb, and my mouse is gone.

#6 drewjohnson

    New member

  • Members
  • 1 posts

Posted 12 January 2008 - 03:36 AM

Before I updated my kernel by using a pre-compiled bin and adding a secondary boot option, I was able to run vbox fine using the instructions here. After updating to use the 2gb, I receive modprobe vboxdrv failed messages. I'm assuming b/c the kernel source I d/l'ed as part of this tutorial no longer matches exactly the kernel I'm running. Would the fix be to compile the 2gb kernel in place of the instructions here? Any input would be greatly appreciated for a new EEE user. Thanks in advance.

#7 Phil_123

    New member

  • Members
  • 8 posts

Posted 22 January 2008 - 10:59 AM

Quote

Before I updated my kernel by using a pre-compiled bin and adding a secondary boot option, I was able to run vbox fine using the instructions here. After updating to use the 2gb, I receive modprobe vboxdrv failed messages. I'm assuming b/c the kernel source I d/l'ed as part of this tutorial no longer matches exactly the kernel I'm running. Would the fix be to compile the 2gb kernel in place of the instructions here? Any input would be greatly appreciated for a new EEE user. Thanks in advance.
Follow the instructions of spode's post, and stop at where he wants you to download the kernel sources from http://www.kernel.or...ux/kernel/v2.6/.
Instead, download the kernel from Asus, the 43.11MB "Linux Kernel" in their Source Code section.
http://support.asus....C%204G%28701%29

Unrar the deb file inside. Start a terminal, cd to where the deb file is, then run these lines: (you might want to use sudo to run these)

dpkg --install linux-source-2.6.21.4-eeepc_5_all.deb
cd /usr/src
tar -xjvf linux-source-2.6.21.4-eeepc.tar.bz2
sudo rm linux-source-2.6.21.4-eeepc.tar.bz2
sudo ln /usr/src/linux-2.6.21.4-eeepc /usr/src/linux -s
cd linux-source-2.6.21.4-eeepc
then run make menuconfig
if you get compilation errors, you'll need to install the libncurses5-dev package, by running sudo apt-get install libncurses5-dev
if you can't install that package, refer to the wiki on how to add additional package sources.

You'll be in a interface where you can set various settings of the kernel source code. Go to
Processor type and features -> High Memory Support -> Change from "off" to "4gb"

If you used the modified kernel with boot from usb/sd support, you'll also want to change
Device Drivers -> Support for Host-side USB -> Change all to <*>

Exit and save your changes. Now continue reading spode's post at "Now, we need to set up the build."

If you installed VirtualBox before you switched kernels, you don't need to install VirtualBox again. Just follow VirtualBox's error message that tells you to run something in a terminal. VirtualBox will run fine after that.

References:
http://www.ultramobi...-to-enable.html
http://wiki.eeeuser....ebuildthekernel

Edited by Phil_123, 22 January 2008 - 11:00 AM.


#8 optix

    New member

  • Members
  • 1 posts

Posted 23 January 2008 - 07:49 PM

Well after all I managed to run VirtualBox - thanks to this tutorial .
The other thing is how to setup the network for VirtulBox ....
I have tried NAT, I have tried Host Interface tried even internal networking . ....
The original manual from vitrual box didnt help .

System - original Xandros .

Does any one have Xandros on EEE with VirtualBox and network between the host and the guest ?
If so plz let me know how you managed to make it work .

#9 Phil_123

    New member

  • Members
  • 8 posts

Posted 09 February 2008 - 09:30 AM

Quote

Well after all I managed to run VirtualBox - thanks to this tutorial .
The other thing is how to setup the network for VirtulBox ....
I have tried NAT, I have tried Host Interface tried even internal networking . ....
The original manual from vitrual box didnt help .

System - original Xandros .

Does any one have Xandros on EEE with VirtualBox and network between the host and the guest ?
If so plz let me know how you managed to make it work .
I leave every networking setting untouched - I use the default NAT settings for the guest OS, and they work perfectly - just make sure you have installed the Guest Additions properly for the guest OS.

#10 man76

    New member

  • Members
  • 1 posts

Posted 10 February 2008 - 02:33 PM

i have error in this toturial ;/usr/bin> /etc/init.d/vboxdrv start
Starting VirtualBox kernel module: vboxdrv
* Modprobe vboxdrv failed. Please use 'dmesg' to find out why.


/usr/bin> dmesg | modprobe vboxdrv
FATAL: Error inserting vboxdrv (/lib/modules/2.6.21.4-eeepc/misc/vboxdrv.ko): Unknown symbol in module, or unknown parameter (see dmesg)

anyone can help me how to fix it? th alot

#11 quants

    New member

  • Members
  • 1 posts

Posted 17 February 2008 - 03:05 PM

I have worked through each step and intalled the eeepc version of the kernal but still get error .

My virtual box doesn't appear as an icon in work and when I start it in the terminal screen I get told that the vboxdrv kernel is not loaded. if I do sudo etc/init.d/vboxdrv setup. I get Modprobe box failed please use dmesg to find out why. The final line of dmesg says vboxdrv: disagrees about version of symbol struct_module.

Can anybody help me please

Thanks

#12 paksoy

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 16 March 2008 - 07:46 AM

when i write

sudo apt-get install build-essential

then console is

Posted Image

what is the problem?

#13 DeeJay

    Senior Member

  • Members
  • 352 posts

Posted 16 March 2008 - 08:01 AM

Did you already try what the last of those warnings told you to do?

#14 paksoy

    Advanced Member

  • Members
  • PipPipPip
  • 32 posts

Posted 16 March 2008 - 09:37 AM

yeah but i couldnt find build essential. where can i findi it?

#15 DeeJay

    Senior Member

  • Members
  • 352 posts

Posted 16 March 2008 - 10:03 PM

Build-essential is what you are trying to install, right?

And the installation has failed, so of course you can't find build essential. (But actually, what you hope to find is a whole set of tools like gcc, make, etc.. )

But the last WARNING said "You may want to run apt-get update to correct these problems".

Did you?

#16 hawkfire

    Senior Member

  • Members
  • 103 posts
  • LocationOttawa, ON, Canada

Posted 24 March 2008 - 02:29 PM

After the install, can we delete the files from /usr/src? They take up about 250MB, which on an eee is precious cargo....

#17 whistler

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts
  • LocationOxfordshire, UK

Posted 01 April 2008 - 02:35 PM

Quote

...if I do sudo etc/init.d/vboxdrv setup. I get Modprobe box failed please use dmesg to find out why. The final line of dmesg says vboxdrv: disagrees about version of symbol struct_module.

Can anybody help me please

Thanks
I'm getting a similar error. I've followed the instructions above with the kernel from the kernel.org site.
When I try to start the vboxdrv service, it fails "*Modprobe vboxdrv failed. Please use 'dmesg' to fine out why"
dmesg says: "vboxdrv: disagrees about version of symbol struct_module."

I've tried "sudo /etc/init.d/vboxdrv setup"
It removed the old module , but fails to recompile it. Again, dmesg says: "vboxdrv: disagrees about version of symbol struct_module."

Can anyone help?

#18 dcarrillol

    New member

  • Members
  • 6 posts

Posted 01 April 2008 - 09:33 PM

I've tried "sudo /etc/init.d/vboxdrv setup"
It removed the old module , but fails to recompile it. Again, dmesg says: "vboxdrv: disagrees about version of symbol struct_module."

Can anyone help?

#19 whistler

    Advanced Member

  • Members
  • PipPipPip
  • 75 posts
  • LocationOxfordshire, UK

Posted 02 April 2008 - 08:30 AM

I've had another go at getting this working. Still no joy.
I downloaded the -eeepc kernel from the asus site and followed Phil_123's instructions above. vboxdrv still won't start or rebuild, but this time I get the following dmesg error: "vbox: Unknown symbol page_address"

I've really like to get this working. Do I need to us the linux kernel off the kernel.org site, or the -eeepc one from the Asus site?
Could someone create a wiki page and consolidate the procedure? Then I'll F9 my EEEPC and try it again from scratch. :)

Edited by whistler, 02 April 2008 - 08:30 AM.


#20 iztoogood

    New member

  • Members
  • 4 posts

Posted 09 April 2008 - 01:18 PM

hye,
first : i'm newbie in linux so ... in advance... sorry :-)
but first fo all i've proble at the step
sudo make oldconfig && sudo make prepare
it answer :
(translated from french) "no rules to build target "oldconf | prepare | all " Stoped "

someone can help me please ?





1 user(s) are reading this topic

0 members, 1 guests, 0 anonymous users