Print
Written by Rachman Chavik | Sunday, 27 January 2008 00:36
User Rating: / 4
PoorBest 

 

These days, I do my work on a Lenovo T60. It has an Intel Core 2 T7200 2.00GHz with 1G of RAM. It came preloaded with Vista Business and IBM ThinkVantage software. According to Vista, it has a Window Experience Index base score of 4.0. Overall, the machine is pretty slick if you don't mind the occasional crash from Explorer and the dreaded blue screen.

Control Panel

 

I have been itching to have Linux on my laptop. But I don't want to partition my disk. It's already running out of space, and I have some pretty 'important' stuff in there. Further, I don't want to risk losing time doing reinstall if somehow my disk is corrupted.

Sometime after openSuSe 10.3 was released, I decided to have a go with Virtual PC 2007. It went okay. Performance wise is bearable. But I remembered a software I came across a few years back: coLinux. For those who haven't heard of coLinux: Quoting from coLinux official website:

coLinux is a port of the Linux kernel that allows it to run cooperatively alongside another operating system on a single machine.".

I immediately downloaded the latest stable version and gave it a try.

Update: Gerard Braad sends in a link to his Installation instructions for opensuse 11.  Look it up here.

Installation

Unfortunately, there is no image available for openSuSE 10.3. So, after a bit of googling I found that the process of creating a new distro image is not trivial. The documentation and wiki are confusing, since they have just changed configuration format and most of the articles are not synchronized with the current version.

Nevertheless, I managed to create my own root image after several hours.

For those interested, the root image creation involves using QEMU to do a base install and some copying between QEMU disk file and the colinux file. Once you have a basic root image, boot it with coLinux and install your required packages. I don't recommend doing the full installation using QEMU since it will be ridiculously slow (Some internet page mentioned an acceleration tool is available, but I didn't try it).

There was a snag when I tried getting the networking to work and when mounting other COFS images.  As it turns out, the latest stable did not support devfs.  After getting the bleeding edge release, those issues are resolved.


Now my openSuSE 10.3 on coLinux is ready:

  • /proc/cpuinfo says I have one Core2 T7200 @ 2.0GHz (not sure whether coLinux can be made to see both core)
  • 256M swap device
  • Shared cofs device for transferring data between coLinux and Vista using cofs device. (Can't seem to mount more than 1 cofs device)
  • 2 filesystem images: 4G for root and another 4 for home partition using cobd devices.
  • Shares network connection, through my Intel Pro/Wireless 3945ABG card.
  • tuntap bridging for private connection between host and guest
 Boot and Login

Here's a few more screen shot of my system. One is the coLinux daemon with native fltk toolkit.  The other is a PuTTY session connecting via SSH to the guest OS using the tuntap network device IP Address.
/proc/cpuinfo
Disk and Networking

When all this are in place, I mounted the ISO and performed additional install to get the rest of packages in place, eg: C/C++ development, Gnome, and Web Server packages.

 

First test: Updating mono subversion work area.

I have an already checked out tree, and I used the Paul Johnson's monoupdater.sh script to get the latest revision.  The script ran for about 15 minutes, updating the mono tree to revision 93972 for directories: mono, mcs, libgdiplus, gtk-sharp, gtksourceview-share, and monodevelop.  After a while, memory use went up from about 300MB to 927MB.  Task Manager says my CPU utilization is about 34%.

My laptop was swapping quite heavily so I decided to reboot coLinux before proceeding to the next test.

 

Second Test: Compiling the tree

Compilation

Compiling the tree took 19m10s.  Vista's Task Manager says CPU utilization is 50% with about 592MB memory use. At the end of compilation, memory use was 887MB.  However, this time Vista was not swapping much, and the machine was responsive. In Vista, I even managed to do some browsing during this compilation process.

This compilation time is for building mono subdirectory (that built mono and mcs only).  libgdiplus is compiled separately.

 

Third Test: Running mono

I installed mono and libgdiplus.  Copied Lutz Roeder's Reflector.exe to my shared directory and run it with mono. For an X Server, I used Xming. I also fired up another copy in my Vista. The machine is still responsive.

Reflector on mono works, although limited.  The menus sometimes responded slowly, and the toolbar is missing.

Running Mono Winforms

 

Conclusion

Nothing beats working natively in Linux.  But coLinux is a great tool. that can assist developers when  writing and testing their software natively, without having to reboot the computer.

 

References

  1. coLinux official website, http://www.colinux.org/
  2. coLinux project site: http://sf.net/projects/colinux
  3. coLinux wiki: http://colinux.wikia.com/wiki/Main_Page
  4. Installation HowTo hints: http://osdir.com/ml/linux.colinux.general/2005-02/msg00174.html
  5. IBM Developerworks: http://www-128.ibm.com/developerworks/linux/library/l-virtualization-colinux/
Discuss
Last Updated (Saturday, 18 April 2009 14:09)