237pages on
this wiki
Add New Page
Talk3 Share

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.

A good way to get started with coLinux is to start with a blank hard drive image. Here I'll tell about an easy way to get started with the Gentoo Deluxe 2gb image, and how to run X programs, etc. (see also

Download coLinux Edit

This is the first step, and if you are here already, this step should have been completed. Just go to to get a new release, but I strongly suggest using the newest snapshot at Just extract the files to `c:\colinux` and you are on your way.

Downloading the Gentoo Deluxe Image (This will happen as part of the setup procedure if requested) Edit

To download the Gentoo Deluxe 2 gb image, go to the sourceforge download site at But be aware that it extracts to a whole 2 gb. I STRONGLY suggest that you download one of the swap files (the main package fetcher for Gentoo is "emerge" which downloads the source and auto-compiles for you. But big programs can't compile, and smaller programs take a long time if you do not have enough swap space.) Also note that this is a very stripped down install, so you may have to setup portage and emerge packages as shown below.

The image is in bzip2 format so you can decompress them with cygwin's bunzip2 or 7zip.

Editing the default.colinux.xml config file Edit

In your `default.colinux.xml` file, all the configuration options for colinux go in. Here is what you should add. After a few lines, you'll see a line which starts with <block_device> and goes on. This is the place you define where the hard drive image file is, and what index it is. (The index is used to place the drive in a correct /dev entry. The location of a drive you add in the colinux config is /dev/cobd/X where X is the index number. The path is simply the path to the image). Of the first <block_device> entry, edit the string after `path=` and change it to say `\DosDevices\path\to\file\gentoo-i586-ext3-2g-deluxe` Where `\path\to\file` is the location where you extracted colinux to.

The default installation path is "C:\Program Files\coLinux". This may not work. Most of the examples here suggest using just "C:\coLinux".

But note: if your hard drive image was `hdd.img` and was kept in `C:\` this is the notation: `\DosDevices\c:\hdd.img`. So any device like `C:` or `D:` has to be preceded by `\DosDevices\`. For example, if you followed the instructions by the letter and extracted in c:\colinux the string will be


If you downloaded the swap files from the website,here is what you add: Below the line which says `</block_device>` Add this:

<block_device index="1" path="\DosDevices\path\to\file\swap_xxxM"><block_device>

Where xxx is the amount of MB the swap space is.

Example config file: Edit

<?xml version="1.0" encoding="UTF-8"?>
    <block_device index="0" path="\DosDevices\c:\Gentoo"
    enabled="true" />

    <block_device index="1" path="\DosDevices\c:\swap_512Mb"
    enabled="true" />


    <initrd path="initrd.gz" />

    <image path="vmlinux" />

    <memory size="128" />

    <network index="0" type="tap" />

Starting up the machine Edit

Now that the ouside configuration is done, lets make the gentoo system usable. First execute

colinux-daemon.exe -c colinux.xml

If the config was edited right, and no more errors occured a second window, called "Cooperative Linux Console" will come up. This is your window to the system. After loading for a bit it will come up to a login prompt. For the username type in


and for the password, the default password as of January 2005 is "root" (for older versions just hit enter). Congrats! You are now in a gentoo system. Now add the swap to your fstab and activate it.

echo "/dev/cobd/1 none swap sw 0 0" >> /etc/fstab
mkswap /dev/cobd/1 #if you created the image yourself
swapon /dev/cobd/1

You can use the `free` command to see if the swap was enabled.

Getting portage working Edit

In order to make the downloaded disk image smaller, the portage ebuilds may not have been included. This is the case if your getting errors from `emerge --sync`.

Note: You should check to see if the networking is functional. You can visit coLinuxNetworking for more information, however, to start networking in Gentoo, just execute `/etc/init.d/net.eth0 start`. Also, if you need to use a proxy, set that up in your `make.conf` file as shown in the section below.

So, you may need to setup the `/usr/portage` package directory. To do this, using wget just download a portage snapshot here or at the mirror closest to you gentoo mirrors and then:

tar xjvf -C /usr/
emerge --sync #this should now work

Starting X with VNC Edit

It's a very good idea to extend the filing system beyond 2GB before the following otherwise you'll run out of disk space.

This, in my opinion, is the best way of using X programs. Before you do this, be sure to get the TightVNC viewer for windows.

Now get the vnc server for linux:

emerge -a tightvnc

Now, if you haven't done so already, you will want to setup a user account for X stuff. I recommend the `superadduser` program for this. For example, I will create a new user named `me`.

emerge -a superadduser
superadduser me

Next you will modify `~/.vnc/xstartup`. This file is sourced by the vncserver when it is first started. Make sure you modify this file for the correct users, not root. Here is my xstartup for starting fluxbox:


xrdb $HOME/.Xresources
xsetroot -solid grey
startfluxbox &

Now you can do a `sudo -u me vncserver` to start the vncserver for under a certain user, but i highly recommend that you automate this as a service. Create the script `/etc/init.d/vnc`, add all of the users you want to in the `$USERS` variable, set the service executable, and add it to the default runlevel. --TimG, I'll add more later.

cat >> EOF


depend() {
        need net

start() {
        for u in $USERS;
                do echo "Starting vncserver for user=$u:"
                sudo -H -u $u vncserver :1
        eend 0

        for u in $USERS;
                do echo "Stopping vncserver for user=$u:"
                sudo -H -u $u vncserver -kill :1
        eend 0

chmod +x /etc/init.d/vnc

rc-update add vnc default

To include the ability to copy and paste between vnc clients and the host OS, add the following line inside the for loop in the start() routine:

sudo -H -u $u vncconfig -nowin -display :1 &

(note on vncserver: if you have 1024x768 resolution, and want to see the taskbar, give vncserver: `-geometry 1000x685`).

The first time you run vncserver, it will ask you for a pasword, so type one in. REMEMBER IT. Now, open up the VNC Viewer you got earlier in the step for windows, and when it asks you for the hosts ip. Type in the gentoo system's ip and add a ":1" to it. (By default, i think it should be, so the value in the first box of vnc viewer is ""). Now it will ask you for the session password. Type in the password you created when starting the server. And VOILA! Thats it, you have X working. In order to start X, the next time you start the gentoo system type in the vncserver command again that i said above.

If you started x from the commandline you can stop it with `vncserver -kill :1`, otherwise stop it with `/etc/init.d/vnc stop`.

Example /etc/make.conf Edit

This is my `make.conf`. Note that I have setup portage to use a proxy.

USE="aim -svga -arts"
CFLAGS="-O2 -mcpu=i686 -fomit-frame-pointer"


I ran into a problem with the following error when trying to run the command below:

emerge -a vim

!!! ARCH is not set....Are you missing the /etc/make.profile symlink?
!!! Is the symlink correct?  Is your portage tree complete?

The following commands will fix this error:

cd /etc
rm make.profile
ln -s /usr/portage/profiles/default-linux/x86/2006.0 /etc/make.profile

Example /var/lib/portage/world Edit

Here is my `world` file with several packages, in rough order of importance.


Setting up fluxbox with vnc Edit

Running X with GDM Edit

TODO, see

MassTranslated on Sun Apr 23 17:36:11 UTC 2006

Also on Fandom

Random Wiki