Page 1 of 1

How-To: eee PC 901 Xandros Linux as guest in a VirtualBox

Posted: 2. Nov 2008, 18:24
by JohannesVBox
Dear Forum,

I'm writing this for those who want to give the eee Linux a try before buying the actual hardware.

You need a different Linux Installation in a second VDI later! I don't describe how to do that because there are many how-tos around. You need little Linux knowledge.

( Important for Windows only users: At a later step you need a running Linux OS before you can boot because you have to make an (easy) modification to the Xandros installation! Therefor you have to mount the eee.VDI into a running Linux guest - read on...)

1) You can run the boxed Xandros Linux in a virtual box since the Linux is GPL'ed (of course) and the sources are published. Somebody made the work mastering a Recovery Image from the sources. You can download the ISO for the eee PC 901 here:

http://sourceforge.net/project/download ... 080719.iso

2) Now you create a new guest with Linux kernel 2.6 OS. Create new VDI (original uses 8 GB but lesser should work also, minimum will be 2 GB) and boot from the downloaded ISO. It will ask you to press Enter to install. The installation program will create the partitions, format it and copy an image included in the ISO to the disk.

At this moment Linux is installed and boot but can't run graphical user interface (x.org) because the VirtualBox needs VESA and not a eee specific driver.

3) The steps described in this point are required to get the X.org GUI running.

a) Turn of the eee VBox. Detach the eee VDI from the eee guest and attach it to the second Linux guest additionally. Boot the second guest, open a console window and get root (su).

Now you have to mount the eee VDI partitions. I assume you attached the eee VDI as primary slave. The eee VDI will be /dev/sdb then.

Code: Select all

# mount /dev/sdb1 /mnt
b) Inside /mnt you can find a large file (1,6 GB) called root.sfs now. This is the actual Xandros Linux. the file root.sfs is is a compressed read-only filesystem for Linux. Inside this fs you can find the x.org configuration file /etc/X11/xorg.conf which has to be modified. Now you need to uncompress it (step d) modify the xorg.conf (step e) and compress it again (step f). The tools to do that are described in step c).

c) The filesystem in root.sfs is called squashfs. You can find additionally information here:

http://squashfs.sourceforge.net/

Prepare the squashfs-tools: Open a new console window for a unprivileged user. Download the tools:

http://sourceforge.net/project/showfile ... _id=622329

Unpack it to let's say /home/user/squashfs3.4. Then build the tools (at least make and gcc have to be installed) and copy the binaries to somewhere:

Code: Select all

# cd /home/user/squashfs3.4/squashfs-tools
# make
# cp mksquashfs /home/user/bin
# cp unsquashfs /home/user/bin
Close the user's console window.

d) Go back to the root console. Uncompress the the file root.sfs

Code: Select all

# /home/user/bin/unsqashfs -d /tmp/eee-root /mnt/root.sfs
Wait until it's finished. This really depends on your CPU power. You have to be root otherwise it will fail! Now you find the Xandros Linux in /tmp/eee-root.

e) Open the file /tmp/eee-root/etc/X11/xorg.conf in your prefered editor. Modify it that it has the following content:

Code: Select all

Section "ServerLayout"
        Identifier     "Xandros"
        Screen      0  "Screen1"
        InputDevice    "keyboard"
        InputDevice    "mouse"
EndSection

Section "Files"
        ModulePath   "/usr/lib/xorg/modules"
        FontPath     "/usr/share/fonts/X11/misc"
        FontPath     "/usr/share/fonts/X11/Type1"
        FontPath     "/usr/share/fonts/X11/75dpi"
        FontPath     "/usr/X11R6/lib/X11/fonts/Type1"
EndSection

Section "ServerFlags"
        Option      "AllowMouseOpenFail"
        Option      "BlankTime" "5"
        Option      "DontVTSwitch"      "true"
        Option      "AIGLX" "false"
        Option      "GLX" "false"
        Option      "GLCore" "false"
EndSection

Section "InputDevice"
        Identifier  "keyboard"
        Driver      "kbd"
        Option      "CoreKeyboard"
        Option      "XkbRules" "xorg"
        Option      "XkbLayout" "us"
        Option      "XkbVariant" ""
EndSection

Section "InputDevice"
        Identifier  "mouse"
        Driver      "mouse"
        Option      "Device" "/dev/input/mice"
        Option      "Protocol" "IMPS/2"
        Option      "Emulate3Buttons" "yes"
        Option      "ZAxisMapping" "4 5"
        Option      "CorePointer"
EndSection

Section "Monitor"
        Identifier   "Monitor1"
        VendorName   "ASUS"
        ModelName    "eeePC P701"
        Modeline     "800x480"  29.58  800 816 896 992  480 481 484 497  -HSync +Vsync # 60 Hz
EndSection

Section "Device"
        Identifier  "Device1"
        Driver      "vesa"
EndSection

Section "Screen"
        Identifier "Screen1"
        Device     "Device1"
        Monitor    "Monitor1"
        DefaultDepth     24
        SubSection "Display"
                Depth     8
                Virtual  1680 1680
        EndSubSection
        SubSection "Display"
                Depth     15
                Virtual  1680 1680
        EndSubSection
        SubSection "Display"
                Depth     16
                Virtual  1680 1680
        EndSubSection
        SubSection "Display"
                Depth     24
                Virtual  800 600
        EndSubSection
EndSection
f) At this point you have to replace the file root.sfs with a filesystem containing the modified x.org. You can make a backup but I don't see a reason for it because if something fails you can simply restart at step 1).

All to do now is to compress the files in /tmp/eee-root to a new root.sfs.

Code: Select all

# rm /mnt/root.sfs
# /home/user/bin/mksqashfs /tmp/eee-root /mnt/root.sfs -no-exports
Wait. Wait. Wait. Dream of a new CPU. Now you should have a 1.5 to 1.6 GB root.sfs inside /mnt (which is your eee boot partition).

g) Cleanup: Unmount...

Code: Select all

# umount /mnt
Shutdown (you're still inside your second Linux guest - not inside your eee box)...

Detach eee VDI from your second Linux guest and attach it to your eee guest.

4) Now just boot your eee Virtualbox.

To Dos: Especially get network running.

Image

5) Feedback to this thead is highly desired!

NIC card

Posted: 3. Nov 2008, 21:05
by JohannesVBox
Second issue is the network interface card of VirtualBox.

The PC Net II Adapter listed in options requires the kernel module pcnet32 inside a linux guest.

Best method to integrate the module is to do it right after step 3e) of the scenario above. Then you have it integrated inside your root.sfs filesystem and it will survive if you choose restoring factory settings at a later time.

Building the kernel module pcnet32.ko:

a) Get the kernel source:

http://update.eeepc.asus.com/p901/misc/ ... pc.tar.bz2

untar it to somewhere, let's say /home/user/linux-source-2.6.21.4-eeepc.

Code: Select all

# cd /home/user
# tar xjvf linux-source-2.6.21.4-eeepc.tar.bz2
Get the eee 901 config

http://update.eeepc.asus.com/p901/misc/ ... 21.4-eeepc

put it into a file called /home/user/linux-source-2.6.21.4-eeepc/.config

b) Configure the kernel source as you usually do. I chose

Code: Select all

# make menuconfig
and enable the pcnet32 as module ("m"). If you can't find where to enable - like me - use the search function.

c) Build only the needed module

Code: Select all

# make drivers/net/pcnet32.c
This will build kernel module pcnet32.ko

d) Copy the module into the extracted squashfs filesystem before you assemble it again.

Code: Select all

# cp drivers/net/pcnet32.ko /tmp/eee-root/lib/modules/2.6.21.4-eeepc/kernel/drivers/net/
Now you can go on with step 3f) of the first how-to.

e) After the first boot of the eee VBox you have to do once

Code: Select all

# sudo depmod
voila. That's it. Now you can get all the updates via the eee GUI.

Re: How-To: eee PC 901 Xandros Linux as guest in a VirtualBo

Posted: 30. Jul 2012, 05:42
by rolfp
I was having trouble installing the old Xandros from the eee-pc 701 in OSE Virtualbox on Mandriva Linux 2011 x86_64. First hurdle was to attach the xandros vdi to the ide controller, as the default SATA AHCI is not supported in that vintage Xandros. Then, it seems my old 4g dvd might be corrupt, so I downloaded a couple newer isos from Sourceforge. Those got through the install but boot was to a black screen and google brought me here.

I created another vm out of Mandriva 2011 x86_64 Power Pack, attached the xandros vdi, following your instructions, and mounted the partition in Mandriva VM. At this point, the filesystem was visible, uncompressed. Maybe due to newer iso?

Anyway, copying your xorg.conf into the xandros vdi and attaching it back to the xandros vm got a working boot with gui. Maybe network, next. Thanks very much for this method.