Cooperative Linux (coLinux)

Run Linux Under Windows 2000/XP

1. What is coLinux?

coLinux allows the Linux kernel to run as a program under Windows NT 5.0 and above. It consists of a low-level Windows kernel driver (used to allow the Linux kernel to access hardware and other system resources), cygwin1.dll, a console application, a patch for the kernel, a daemon to run the kernel, and an optional TAP network driver for Windows (for networking functionality). The running Linux kernel has its own devices and userland and operates alongside the existing Windows processes. Software does not need to be recompiled to run under coLinux. Think of it as User-Mode Linux -- for Windows.

2. How does it work?

coLinux works just like any other Linux kernel -- it boots the "system," manages hardware, and provides functionality to userland programs. Thanks to the coLinux patches, the kernel communicates with colinux-daemon.exe and linux.sys (the low-level driver mentioned in section one) instead of talking to "real" hardware. The daemon and driver handle giving the kernel its memory, devices, and other resources and the kernel "does its thing." Processes running under a coLinux kernel do not have Windows process IDs -- they all share one process: colinux-daemon.exe. Because it requires a low-level driver, the coLinux daemon needs to be run with administrator privileges.

3. What distributions can be run using coLinux?

Any distribution can be used with coLinux. It is even possible to boot an existing Linux installation from other partitions or disks and run it -- all under Windows. The coLinux site has links to compressed disk images of distributions like Debian, and also has information on "converting" distributions to run with coLinux. As highlighted in section one, a coLinux kernel will execute regular binaries without change.

4. How does it handle disks?

There are two options for disks in coLinux. It can use disk images on the Windows filesystem, or it can access partitions on a physical disk. The second option is what allows you to boot an existing installation using a coLinux kernel. These options and many more can be tweaked to your heart's content by editing coLinux's XML configuration file. Disks in coLinux appear as /dev/cobd# in the running environment.

5. How does it handle the display?

There isn't support in coLinux for emulating a native display. The coLinux daemon runs in the background, and an included terminal program can connect to the daemon to act as a console for the running coLinux system. You can also connect to any running network servers if you have configured networking. This opens up a large number of possibilities for interacting with the Linux system.

6. But what about X?

Because coLinux doesn't emulate a native display, a normal X server can't be used while running under coLinux. The two most popular options are VNC and using a Win32 X server (such as Cygwin/X). Unfortunately, neither of these options allow for graphics acceleration.

7. And what about sound? USB? My own custom bus soldered directly onto my northbridge?

The coLinux system cannot directly address any devices on the system. This means no native sound, no taking over USB ports, and no other complete hardware control. For sound, there are two popular solutions: use a sound daemon under Windows and have the Linux software requiring sound service connect to it, or stream the sound over Shoutcast/Icecast. The coLinux wiki includes a link to an ESD-compatible sound daemon for Windows.

8. But, dear God, why!?!?

coLinux is another way to introduce new users to Linux, cater to users not ready to make a total switch, and provide Linux functionality to people trapp^H^H^H^H^Husing Windows. It's certainly not for everyone, but it offers newfound flexibility to users who need it.

9. How is this different from Cygwin?

Cygwin is a project that allows POSIX-compliant software to be compiled and run on a Windows system natively, using the cygwin.dll library to handle the dirty work. It does not act as an entire operating system. coLinux is specifically Linux and runs the entire operating system as a Windows process. Nothing (besides the kernel) needs recompiling to use coLinux. Behind the scenes, coLinux does use cygwin.dll to help the kernel run in the Windows environment, but software running under coLinux is really running under Linux.

10. Where can I get help?

The coLinux site is a good place to start. It links several other sites, including a wiki. If you've exhausted those options, aren't interested in checking the coLinux site, or are above checking for documentation on the project's site, you can look for help on sites that focus on your distribution. Gentoo's documentation page and forums, for instance, include plenty of good information on booting a Gentoo system using coLinux. You'll find (hopefully) helpful links below.

11. Does it run under WINE? I want to run coLinux on WINE on Darwin on Bochs on FreeBSD on VMWare on ...

I highly doubt it. You're free to try, and maybe I'll even host screenshots.

12. Dangerous Hyperlinkage: