Blog Forum Wiki Links Contact Us NetbookUser

You are not logged in.

#1 2007-12-25 1:14:09 pm

spode
Member
Registered: 2007-12-22
Posts: 27

HOWTO: Install VirtualBox

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:

Code:

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.

Code:

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.

Code:

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:

Code:

uname -r

The source can be found at http://www.kernel.org/pub/linux/kernel/v2.6/

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

Code:

sudo mkdir /usr/src

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

Code:

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.

Code:

sudo ln /usr/src/linux-2.6.21.4 /usr/src/linux -s

Now, we need to set up the build.

Code:

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.

Code:

sudo make all

Now, we should be able to install VirtualBox.

Code:

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

Code:

sudo nano /usr/sbin/services.sh

At the end of the file add:

Code:

/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.

Code:

sudo nano /bin/vboxrun

And then paste the following code in, by pressing both mouse buttons together.

Code:

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.

Code:

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.com/viewtopic.php?id=6645

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

Code:

sudo asusadd Work VirtualBox /usr/bin/VirtualBox

Or for my preferred method two:

Code:

sudo asusadd Work VirtualBox /bin/vboxrun

Happy Virtualizing!

Last edited by spode (2007-12-25 7:36:37 pm)

Offline

 

#2 2008-01-05 5:01:45 pm

hawkfire
Senior Member
From: Ottawa, ON, Canada
Registered: 2007-11-22
Posts: 103

Re: HOWTO: Install VirtualBox

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}

Offline

 

#3 2008-01-09 10:47:35 am

spode
Member
Registered: 2007-12-22
Posts: 27

Re: HOWTO: Install VirtualBox

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

Code:

sudo usermod -a -G vboxusers user

I've not got 1GB of RAM in my EeePC and it's working quite nicely.

Offline

 

#4 2008-01-10 12:52:06 pm

hawkfire
Senior Member
From: Ottawa, ON, Canada
Registered: 2007-11-22
Posts: 103

Re: HOWTO: Install VirtualBox

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.

Offline

 

#5 2008-01-11 9:28:41 am

hawkfire
Senior Member
From: Ottawa, ON, Canada
Registered: 2007-11-22
Posts: 103

Re: HOWTO: Install VirtualBox

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

Offline

 

#6 2008-01-11 10:36:57 pm

drewjohnson
New member
Registered: 2008-01-11
Posts: 1

Re: HOWTO: Install VirtualBox

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.

Offline

 

#7 2008-01-22 5:59:36 am

Phil_123
New member
Registered: 2008-01-20
Posts: 8

Re: HOWTO: Install VirtualBox

drewjohnson wrote:

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.org/pub/linux/kernel/v2.6/.
Instead, download the kernel from Asus, the 43.11MB "Linux Kernel" in their Source Code section.
http://support.asus.com/download/downlo … G%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)

Code:

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.ultramobilegeek.com/2007/11/ … nable.html
http://wiki.eeeuser.com/howto:rebuildthekernel

Last edited by Phil_123 (2008-01-22 6:00:47 am)

Offline

 

#8 2008-01-23 2:49:40 pm

optix
New member
Registered: 2008-01-23
Posts: 1

Re: HOWTO: Install VirtualBox

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 .

Offline

 

#9 2008-02-09 4:30:59 am

Phil_123
New member
Registered: 2008-01-20
Posts: 8

Re: HOWTO: Install VirtualBox

optix wrote:

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.

Offline

 

#10 2008-02-10 9:33:40 am

man76
New member
Registered: 2008-02-10
Posts: 1

Re: HOWTO: Install VirtualBox

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

Offline

 

#11 2008-02-17 10:05:31 am

quants
New member
Registered: 2008-02-16
Posts: 1

Re: HOWTO: Install VirtualBox

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

Offline

 

#12 2008-03-16 3:46:55 am

paksoy
Member
Registered: 2008-03-15
Posts: 32

Re: HOWTO: Install VirtualBox

when i write

sudo apt-get install build-essential

then console is

http://img211.imageshack.us/img211/1755/snapshot2ds1.th.png

what is the problem?

Offline

 

#13 2008-03-16 4:01:53 am

DeeJay
Senior Member
Registered: 2008-02-07
Posts: 352

Re: HOWTO: Install VirtualBox

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

Offline

 

#14 2008-03-16 5:37:45 am

paksoy
Member
Registered: 2008-03-15
Posts: 32

Re: HOWTO: Install VirtualBox

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

Offline

 

#15 2008-03-16 6:03:44 pm

DeeJay
Senior Member
Registered: 2008-02-07
Posts: 352

Re: HOWTO: Install VirtualBox

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?

Offline

 

#16 2008-03-24 10:29:00 am

hawkfire
Senior Member
From: Ottawa, ON, Canada
Registered: 2007-11-22
Posts: 103

Re: HOWTO: Install VirtualBox

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

Offline

 

#17 2008-04-01 10:35:43 am

whistler
Member
From: Oxfordshire, UK
Registered: 2007-10-10
Posts: 75

Re: HOWTO: Install VirtualBox

quants wrote:

...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?

Offline

 

#18 2008-04-01 5:33:42 pm

dcarrillol
New member
Registered: 2008-03-29
Posts: 6

Re: HOWTO: Install VirtualBox

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?

Offline

 

#19 2008-04-02 4:30:05 am

whistler
Member
From: Oxfordshire, UK
Registered: 2007-10-10
Posts: 75

Re: HOWTO: Install VirtualBox

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. smile

Last edited by whistler (2008-04-02 4:30:29 am)

Offline

 

#20 2008-04-09 9:18:54 am

iztoogood
New member
Registered: 2008-04-09
Posts: 4

Re: HOWTO: Install VirtualBox

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 ?

Offline

 

#21 2008-04-09 9:54:56 am

iztoogood
New member
Registered: 2008-04-09
Posts: 4

Re: HOWTO: Install VirtualBox

to complete my question,
in the directory /usr/src/linux/
i now have
a shortcut name linux-source-2.6.21.4
created by the commande "sudo ln /usr/src/linux-2.6.21.4 /usr/src/linux "
that redirect to
/usr/src/linux-source-2.6.21.4
in this directory,i d'ont have any file named "make"

Last edited by iztoogood (2008-04-09 9:55:28 am)

Offline

 

#22 2008-04-09 10:10:35 am

iztoogood
New member
Registered: 2008-04-09
Posts: 4

Re: HOWTO: Install VirtualBox

thanks, i've found... in fact, i launche the command in
/usr/src/linux/linux-6.6.21.4/
and not in
/usr/src/linux/
it look to work ...

Offline

 

#23 2008-04-09 10:42:46 am

iztoogood
New member
Registered: 2008-04-09
Posts: 4

Re: HOWTO: Install VirtualBox

then once done... didn't manage to run virtualBow succesfully...
i've restarted my eee...
and know IT LOOP on boot !!!!! :-(
and i haven't usb cdrom drive...

ok: bye bye linux hello xp
i've it since 2 week every thing i wanted to do was hell
that my last word

Offline

 

#24 2008-04-15 11:06:18 am

tenkros
Member
Registered: 2008-03-20
Posts: 15

Re: HOWTO: Install VirtualBox

When I Try to install the VirtualBox, already at the start after  "sudo apt-get install build essential"
I get a long message telling me that various files could not be found

Anton

Offline

 

#25 2008-04-16 11:12:51 am

tenkros
Member
Registered: 2008-03-20
Posts: 15

Re: HOWTO: Install VirtualBox

I have looked further into the problem of installing VirtualBox

With apt-get update I get the message that my PublicKey is not known.

Maybe the code for the apt sources list has changed (from : deb http://www.VirtualBox.org/debian etch non-free)

Does anyone know ?

Anton

Offline

 

Board footer

Powered by PunBB 1.2.15
© Copyright 2002–2005 Rickard Andersson