How-To: eee PC 901 Xandros Linux as guest in a VirtualBox
Posted: 2. Nov 2008, 18:24
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.
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:
Close the user's console window.
d) Go back to the root console. Uncompress the the file 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:
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.
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...
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.

5) Feedback to this thead is highly desired!
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
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
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
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
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
g) Cleanup: Unmount...
Code: Select all
# umount /mnt
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.

5) Feedback to this thead is highly desired!