Table of Contents

Colinux is a "Port of the Linux kernel that allows it to run cooperatively alongside another operating system on a single machine." (-colinux web site).
I already had linux installed on a partition and wanted to run linux in a window in windows. I was able to do this with both VMware and colinux, and settled on colinux because it used less resources. I decided to write this guide to help others get their linux running in windows. Personally I use colinux mainly for the ssh shell, and with samba I can load my windows file system and have the linux development tools.
Advantages:
Disadvantages:
Disclaimer: Try this at your own risk! This guide will get you using some bleeding edge versions of colinux, because the latest stable ones didn't work. Just keep that in mind. If you are using a linux partition you absolutely need, it might be worthwhile to install a vanilla ubuntu on another one and use that. That said, I've been using this for a few weeks and haven't had any problems.
From the Henry Nestler daily builds, open the latest devel-YYYYMMDD folder and download the daemons executables (not debug versions) and vmlinuz kernel.
Extract the daemons and vmlinuz to your colinux dir, replace all existing ones.

Download colinx.conf to your colinux directory, and update the File systems section and root device based on what partition linux and swap are, and what volume they are in windows.
# The default kernel kernel=vmlinux # File systems hda?=\Device\HarddiskVolume? # swap hda?=\Device\HarddiskVolume? # ubuntu # Tell kernel the name of root device root=/dev/hda? # Initrd installs modules into the root file system. # Need only on first boot. initrd=initrd.gz # Maximal memory for linux guest mem=64 # Slirp for internet connection (outgoing) on second linux adapter. # Inside running coLinux configure eth0 with this static settings: eth0=slirp # Networking (tuntap as private network between gust and host) eth1=tuntap,"colinux"
colinux-daemon.exe @colinux.confYou should have your linux partition booting into colinux! You might have to hit enter after the line "* Running local boot scripts (/etc/rc.local)" to get a login prompt.
sudo shutdown -h now
And open a command prompt in windows. Go to your colinux directory and run
colinux-daemon.exe --install-service -config @colinux.conf
Set the service type to Automatic and start it. Use colinux-console-nt.exe to connect a virtual shell to a running colinux service.
if [ -n "`uname -r|grep -- '-co-'`" ]; then exit 0 fiat the beginning because checkfs thinks there's a problem when there's really not, when in colinux.
My approach is to make two different /etc/network/interface files, one for your regular linux setup (interfaces.native), and one for colinux (interfaces.colinux). On bootup, the correct one will be copied to network/interfaces. I made a shell file switch-interfaces.sh to do that. This script will be prepended to /etc/init.d/interfaces
I also made a simple shell script setup_interfaces.sh to setup these interface files. In linux, run
wget http://roth.textdriven.com/other/colinux/setup_interfaces.sh chmod +x setup_interfaces.sh sudo ./setup_interfaces.sh rm setup_interfaces.sh
# start in home cd sudo cp /etc/network/interfaces /etc/network/interfaces.native wget http://roth.textdriven.com/other/colinux/interfaces.colinux sudo mv interfaces.colinux /etc/network/ # prepend switch-interfaces to /etc/init.d/networking wget http://roth.textdriven.com/other/colinux/switch-interfaces.sh cat /etc/init.d/networking >> switch-interfaces.sh sudo mv switch-interfaces.sh /etc/init.d/networking sudo chmod +x /etc/init.d/networking # do a restart to get the right config in place sudo /etc/init.d/networking restart
auto lo
iface lo inet loopback
auto eth0
iface eth0 inet dhcp
auto eth1
iface eth1 inet static
address 192.168.2.2
netmask 255.255.255.0
At this point you have a working linux install in windows through colinux. You can install any software you like. I will run through some packages you probably want.
sudo apt-get update
sudo apt-get install openssh-serverIn windows, download putty and connect to 192.168.2.2 with the ssh protocol.
Install a windows manager with vnc server. A lightweight manager that works well is blackbox:
sudo apt-get install blackbox bbappconf bbdate bbkeys bbmail bbpager bbppp bbrun bbsload bbtime sudo apt-get install tightvncserver sudo rm /etc/alternatives/x-window-manager sudo ln -s /usr/bin/blackbox /etc/alternatives/x-window-manager tightvncserver
In windows, install ultravnc and connect to 192.168.2.2:1 in the viewer.