Asus EEE VirtualBox installation
This weekend a new project presented itself; i was asked by the proud owner of a new Asus EEE PC 901 to install Windows XP next to its existing Linux Operating System.
Asus EEE PC 901 in detail
A little further investigation turned out the device is running Xandros, which is based on Debian. The kernel doesn’t look to unformiliar either:
asus-702049237:/root> uname -a Linux asus-702049237 2.6.21.4-eeepc #6 Mon May 5 11:38:34 EDT 2008 i686 GNU/Linux
This EPC (that’s what Asus calls it..) is equiped with an Intel Atom processor, 1G of memory and 20G SSD storage. The ‘odd’ 20G of solid state storage seems to be a combination of a 4G and a 16G SSD:
asus-702049237:/root> sudo fdisk -l /dev/sda Disk /dev/sda: 4034 MB, 4034838528 bytes 255 heads, 63 sectors/track, 490 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sda1 1 400 3212968+ 83 Linux /dev/sda2 401 488 706860 83 Linux /dev/sda3 489 489 8032+ c W95 FAT32 (LBA) /dev/sda4 490 490 8032+ ef EFI (FAT-12/16/32) asus-702049237:/root> sudo fdisk -l /dev/sdb Disk /dev/sdb: 16.1 GB, 16139354112 bytes 255 heads, 63 sectors/track, 1962 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Device Boot Start End Blocks Id System /dev/sdb1 1 1962 15759733+ 83 Linux
Asus has fitted this device with a nice grub bootloader and has included a system recovery feature. The OS is installed on the 4G SSD, the 16G SSD is mapped entirely to the user’s homedir.
Asus did a nice job here. I even crashed the device once (be filling up the root 680M partition to 100%), leaving the device unable to boot. The nice OS restore feature saved the day here, after a few (tense) minutes the OS was ready to use again.
The owner was happy with to Xandros OS and just needed to run a few Windows applications. Since I didn’t want to mess with the partition layout we decided to use VirtualBox to host a Windows XP guest OS inside Xandros. This piece emulation software, which has recently been purchased by Sun, is great for virtualization at home. I regularly use it for testing large software installations and like it a lot because of its simplicity and flexibility.
VirtualBox package installation
Installing the software isn’t too hard, the Debian etch virtualbox package from Sun’s website can be used in Xandros. Download it from http://dlc.sun.com/virtualbox/vboxdownload.html#linux
/home/user> sudo dpkg -i virtualbox-2.1_2.1.2-41885_Debian_etch_i386.deb Selecting previously deselected package virtualbox-2.1. (Reading database ... 91381 files and directories currently installed.) Unpacking virtualbox-2.1 (from virtualbox-2.1_2.1.2-41885_Debian_etch_i386.deb) ... Setting up virtualbox-2.1 (2.1.2-41885_Debian_etch) ... addgroup: The group `vboxusers' already exists as a system group. Exiting. Starting VirtualBox kernel module: * No suitable module for running kernel found
VirtualBox has two mandatory kernel modules, which add the virtualization capabilities. Asus didn’t include such modules with their kernel, so the installer scripts will ask if the modules should be compiled. Answer ‘no’ here, because the EPC is not equiped to compile kernel modules. Instead download use modules that i have previously compiled or build them yourself using the guide below.
Compiling the VirtualBox modules
First off, you can skip this step and download the kernel modules I previously compiled here. Download the files and continue reading ‘Installing the kernel modules’ below.
Compiling kernel modules sounds a lot harder than it is. Use another Debian box and make sure it has a proper build environment (sudo apt-get install build-essential). I suggest to compile the modules on another linux box because the EPC is not sufficiently equiped for this task: the required kernel sources and build essentials will quickly fill up it’s ‘clean’ OS. I crashed the EPC on my first try by filling its tiny root partition.
You’ll also need to install the same VirtualBox debian package from Sun’s website. If your Debian box is set-up correctly the installer will probably build vbox modules for your kernel automatically. Don’t worry if compilation failes, the modules aren’t usable for the EPC anyway.
Instead, we’ll compile the vbox modules against the EPC’s kernel source. The EEE kernel source is kindly provided by Asus. I modified some files and put up a mirror here. The original files from the Asus EEE update site are here. These kernel source files are for the 2.6.21-eeepc kernel. If your EPC is equiped with a different kernel, you’ll have to fetch your own. The remainder of the compilation process should remain the same, though.
Download the kernel source and configuration file. Unpack the kernel, rename the configuration file to ‘.config’ and place it inside the kernel source directory.
BIGMEM bug in vboxdrv.ko
The default configuration file provided by Asus is not suitable for compiling the virtualbox modules. Compilation itself will succeed, however the resulting kernel modules will refuse to load:
asus-702049237:/root> modprobe vboxdrv
FATAL: Error inserting vboxdrv (/lib/modules/2.6.21-eeepc/misc/vboxdrv.ko): Cannot allocate memory
This is due to an unresolved bug, see ticket #1458 on the virtualbox bug tracker. This problem can be fixed by enabling HIGHMEM support in the kernel configuration. The file from my site is already patched. If you use your own kernel configuration apply this patch or set CONFIG_HIGHMEM4G=y manually.
There is one more step to take before the kernel modules are compiled: Prepare the kernel:
- change into the kernel source directory
- type ‘make oldbuild’
- type ‘make prepare’
This should build the kernel objects needed for compiling the virtualbox source code. Now build the virtualbox modules using the provided init.d script. Use the KERN_DIR option and set it to the EEE kernel sources:
ns:~# KERN_DIR=/home/jay/software/901/linux-source-2.6.21.4-eeepc /etc/init.d/vboxdrv setup Stopping VirtualBox kernel module: done. Removing old VirtualBox netflt kernel module: done. Removing old VirtualBox kernel module: done. Recompiling VirtualBox kernel module: done. Starting VirtualBox kernel module: * modprobe vboxdrv failed. Please use 'dmesg' to find out why ns:~#
Don’t worry about the vboxdrv failing to load, thats simply because it’s compiled against a different kernel. The new modules are waiting in your modules directory:
ns:~# ls -l /lib/modules/`uname -r`/misc total 236 -rw-rw-r-- 1 root root 124013 Feb 8 12:50 vboxdrv.ko -rw-rw-r-- 1 root root 102563 Feb 8 12:50 vboxnetflt.ko
I suggest to move both modules over to the EPC and continue with the last step.
Installing the kernel modules
Move both kernel modules to the kernel module directory, and update module dependencies:
/home/user> sudo mkdir /lib/modules/`uname -r`/misc
/home/user> sudo cp vbox{drv,netflt}.ko /lib/modules/`uname -r`/misc/
/home/user> sudo depmod -a
/home/user>
If this goes well, load the kernel modules and check the kernel log:
/home/user> sudo modprobe vboxdrv /home/user> dmesg | grep vbox [11933.770000] vboxdrv: Found 1 processor cores. [11933.770000] vboxdrv: TSC mode is 'synchronous', kernel timer mode is 'normal'. [11933.770000] vboxdrv: Successfully loaded version 2.1.2 (interface 0x000a0009).
With the kernel modules succesfully loaded we should be able to use VirtualBox. To finish off, let’s make the kernel modules load automatically during system startup:
/home/user> cd /etc/rc2.d/ /etc/rc2.d> ln -s /etc/init.d/vboxdrv S50vboxdrv /etc/rc2.d>
That’s it! I’ve installed Windows XP SP3 on this EPC, which performs quite nice considering the low power consumption. The VM boots in under a minute. Just don’t forget to install the VirtualBox Guest additions or performance will suffer.
These instructions are for the Asus EEE PC 901, please report any successes or failures with other EEE devices.
February 10th, 2009 at 07:39
Thanks! Great tutorial.
February 10th, 2009 at 17:14
I was very excited to see 901-specific instructions, because I was having huge problems with the instructions on the eeeuser forum. Thanks!! Unfortunately, I ran into a glitch following your tutorial. After installing Virtualbox (clicking the link you provided started an automatic installer) and downloading your kernel, I got to this command:
sudo modprobe vboxdrv
and received this error message:
FATAL: Error inserting vboxdrv (lib/modules/2.6.21.4-eeepc/misc/vboxdrv.ko) Invalid module format
Any advice would be greatly appreciated. Getting Virtualbox running on my eeePC 901 has been an incredibly frustrating exercise. I am very much a Linux novice, but really want to be able to use one Windows program on my eee.
Thanks!
Annette
P.S. Following advice on the eeeuser forum, I disabled all updates (using three different methods) before attempting the install. Please let me know if you think this might have caused problems.
February 10th, 2009 at 22:09
Hi Annette!
Nice to know my posts are useful to other people!
From the error message I can tell the vboxdrv.ko got are corrupt somehow. Also, you did successfully install the modules and have the same kernel on your EEE, so running VirtualBox shouldn’t be a problem.
I’m not 100% sure if the files that were previously on the server are the right ones, so i’ve uploaded both once more. I also put a tar-gunzip archive there http://www.jayhaabee.nl/eeepc_901/vbox-modules.tar.gz, you’d better use that to prevent your browser from messing with the files.
You can download and unpack (’tar xvz < vbox-modules.tar.gz’) the files and retry the installation if you like.
Let me know if this works for you
February 11th, 2009 at 17:07
You are genius..,
I could not solve this problem couple of days and wasted too much time…
Great tutorial
Thanks a lot
February 12th, 2009 at 03:18
Wow! It works! I am really extremely grateful. I’ve been at this forever, wondering why I wasn’t just taking the whole thing down to our computer support guys to have windows installed.
Annette
March 7th, 2009 at 16:01
Ok. Does _not_ work for the 701 / 512 MB Ram. The pre-compiled vboxdrv.ko does not load … generates some error message like ‘invalid argument’. Here is the solution to make it work for 701/512 MB:
- The very fix you implemented (CONFIG_HIGHMEM4G=y) prevents the module from loading correctly on the 701 / 512 MB. I’ve compiled it with the default settings (default asus kernel config settings) and it fixed the error and loads without problem.
- Also, instead of ‘make oldbuild’ I had to do ‘make oldconfig’
- The vboxdrv still did not compile due to a missing ‘genksyms’ executable. So I had to do a ‘make scripts’ on toplevel first.
Again the steps for the 701 / 512 MB:
1) apt-get install build-essential
2) Get linux source from asus (http://update.eeepc.asus.com/p701/misc/). Untar.
3) ‘make oldconfig’. Do NOT patch the config file (dont use CONFIG_HIGHMEM4G=y)
4) ‘make scripts’
5) ‘make prepare’
6) Get VirtualBox 2.1 and install. During installation it does compile and insert the vboxdrv.ko module.
Works great now.
BTW: I’ve setup a virtualbox on my windows PC first, running Xandros / EEEPC as my development environment. There you can download and compile and test as much as you want without risking to semi-brick your real EEE. Then simply just transfer the compiled .ko files to your real machine.
Great tutorial. Thank you very much for figuring all this out !!!
March 16th, 2009 at 14:07
Works great on the 1000. Brilliant guide. Many thanks.
However, when I have installed XP Pro c/w SP2 from an iso file IE hasn’t been installed for some reason (it was okay when I did the XP Pro build on my host XP Home box via VB). Also, should I have wireless network/internet access via the Host (Xandros) as standard or do I need to do some more tweaking?
March 16th, 2009 at 22:10
Hi Sean, thanks for reporting the installation procedure also works for the EEE PC 1000.
Networking on the 901 i used was up and running without any modification. I used the ‘NAT’ (shared) networking option in VirtualBox, which normally works without additional configuration changes. I did use a wired connection, you might want to try that as well. The NAT option should work on any connection type, though.. at least in theory
Is the virtual network adapter recognized in Windows XP at all ? If not, try installing the VirtualBox ‘Guest Additions’, which contains the correct device drivers and some other nice tools. They’re installed by choosing ‘Devices’ -> ‘Install Guest additions..’ in the VirtualBox Guest window.
March 17th, 2009 at 22:06
Yeah, have tried just about every combination of the 4 NICs and NAT, local host etc etc without any success. I did install the Guest Additions too but that made no difference either.
No, there is no network connection to configure under the windows network connection screen.
Also, I need to:
/home/user> sudo modprobe vboxdrv
/home/user> dmesg | grep vbox
every time before I fire up VB which isn’t a big deal.
I will probably try a fresh XP install over the next few days but with work, family, running and life commitments time is a precious commodity!
Good work anyway!
March 19th, 2009 at 07:17
Can’t get it working on an EeeBox B202 – modprobe vboxdrv step results in “FATAL error inserting (blah blah 2.6.24.0-ep20 etc) Invalid Module Format”….
will keep trying, your tutorial’s gotten me closer than any other so far!
August 12th, 2010 at 12:57
Charlize Theron is getting old now but she is still fiery hot and flawless;..
August 19th, 2010 at 18:07
I like Beyonce…but to me she is living for the spotlight too much, everything has to be perfect, I think she is trying too hard. And she is insecure about herself and what other people think. And she is always trying to show off her assets in everything she wears, thats very disappointing, because when you look good anything you put on always shines!
August 22nd, 2010 at 00:02
There are a couple of things I’d like to know that I don’t think were covered.
August 23rd, 2010 at 22:24
There are simple lifestyle changes that GERD sufferers can do to help them deal with the distress brought about acid reflux Certain lifestyle behaviors are causative factors to this condition. It does not matter what the severity of your situation is, the first step in managing it is to examine the kind of life you live. This is the easiest and low cost way of treating GERD, you just require determination to do it.