Yes.coLinux tells Windows it is installing and using a fairly low level driver, and it needs administrative rights to do that. Of course, if you run as "Administrator" all the time, you won't notice this. Even if you do not run as administrator, you can start coLinux as a service and connect to it as a normal user.

dieselnutjob : If you want to run Windows as a non administrative user then you can create a batch file such as colinux.bat and put these lines into the batch file

where username is the name of a Windows user who does have administrative rights. When a normal user double clicks colinux.bat they will be prompted for the password of username and then colinux will boot up. The -t nt option can be removed if you prefer the standard colinux console.

Newbie: Is there any chance of a version that doesn't require Admin rights? I'd like a linux system on flash disk that I could run on windows in internet cafes, at work or university (places where I may not have admin) without rebooting. QEMU is too slow to use as a main working environment.

No. The way coLinux works precludes that. You need full virtualization, like QEMU provides. Look for a light-weight Linux distribution to use in internet cafes with a flash drive. Gnome and especially KDE are known resource hogs, so avoid those window managers with virtual machines. Most light-weight distros are based on faster and simpler window managers, with most of the functionality you'd expect, like Damn Small Linux, which even fits onto a 64MB USB flash stick without any extensions.

As you can see in the screenshots, a virtual network was implemented between the Linux and the Windows that runs it. If you run a MySQL database on the Linux, there's no problem accessing it via TCP/IP from the Windows. From the host's standpoint, coLinux is just another computer on the network.

Any distribution can run, although some slight modifications must be made for it to work properly and to use coLinux's provided virtual devices. For more information, see the Converting Distributions Wiki page.
Also, Nir Perry has posted a distribution installation HOWTO
on the colinux-devel mailing list (on 16 Feb 2004).

Q3. I have a dual boot system. Is it possible to run coLinux from the Linux partition when I'm in Windows? Edit

Under Windows, it is possible to read and write partitions like regular files by accessing them using the pathname \Device\HarddiskVolumeX, where 'X' should be replaced with a number.
So you can change coLinux's configuration file to use \Device\HarddiskVolumeX
as a block device, instead of using a regular file.
See the file colinux-daemon.txt included with coLinux 0.7.1 or later.

In the pathname \Device\HarddiskVolumeX, X is the number of the partition. It starts counting from 1, so if the partition you want to use is the third one on your second hard drive, and your first hard drive has two partitions, then X is 5.

Another way to access the partitions is to use the pathnames \Device\HarddiskN\PartitionX, where N is the number of the disk (starting from 0) and X is the number of the partition in this disk (starting from 1). Note that windows does not consider the extended partition space (in which logical partitions are allocated) to be a "partition" and thus does not give it a number. Linux partition numbers will thus be off by one from windows partition numbers for all partitions greater than 3.

In this case, the numbering is like that used in Linux fdisk (for primary partitions, at least). For example,

hda1 ==> Harddisk0\Partition1

hdb1 ==> Harddisk1\Partition1

hda3 ==> Harddisk0\Partition3

If your fourth partition (hda4) is an extended space for logical partitions,

hda2 ==> Harddisk0\Partition2

hda3 ==> Harddisk0\Partition3

hda5 ==> Harddisk0\Partition4

hda6 ==> Harddisk0\Partition5

If your second partition (hda2) is an extended space for logical partitions, and your third and fourth partition table entries are unused:

hda1 ==> Harddisk0\Partition1

hda5 ==> Harddisk0\Partition2

hda6 ==> Harddisk0\Partition3

Note: if you only have 4 partitions on a drive, it is possible that they are all primary partitions, although this usually only happens if you do it on purpose. In that case, all 4 partitions would have the same number on Linux and Windows.

Note: it seems that the partition numbers reported by the windows diskpart.exe utility (C:\Windows\system32\diskpart.exe) are not consistent with the partition numbers used by the operating system itself, under circumstances of extended partitions or out-of-order partition table entries.

PeterMarquardt : If you use ext2fsd to mount your Linux partitions in Windows, be sure to unmount all partitions that are defined in your config before starting the colinux-daemon or you will get tons of I/O errors.

Jean-marc Mercy : I had to go even further and uninstall ext2fsd before the partitions could be
recognized. It worked perfectly after that. There is no need of ext2fsd after installing Colinux anyway.

ErikDeBruijn: Please also look here if you can mount a Partition on colinux, but it gives I/O errors (see ErrorsWithRawPartition), while the disk is fine and not in use by windows:

<trohrer>It may be obvious to many, but you need to set the bootparams line of the XML file to boot to your "root" partition, not your "boot" partition (that's the part that COLinux replaces)... You will also likely need to match your colinux kernel to the dual boot kernel, and you may need to cp -r the /lib/modules/2.X.XX-colinux... directory from a "pre-formed" image onto the dual boot system

Karl Zollner notes that:
(I am not sure how much of this due to possible differences between XP Pro and XP home or between single drive vs. multi-drive configurations)On my single-drive Windows XP Home laptop I found that I had to do things somewhat differently than described above:

since there is only one hard drive the reference in the default.colinux.xml file becomes:

What is strange is that where there is only one drive, the "Harddisk" number defaults to "1"

PeterMarquardt : I can not confirm this. I have just set up coLinux on my Notebook which has both just one drive and Win XP Home Edition (SP2). There must be some other reason, so be sure to first try the method mentioned above even if you have Win XP Home and only one drive.

Pipotron : I have a Win XP Pro SP1 and I've got a mix between the two convention :
when I launch fdisk -lu the result is :

but in the default.colinux.xml file I must write :
\Device\Harddisk0\Partition2 to reach my boot partition and
\Device\Harddisk0\Partition4 to reach the root partition.
To resume :
hda2 =>\Device\Harddisk0\Partition2
hda5 =>\Device\Harddisk0\Partition4

ps : we can reach the whole disk at /dev/cobd0 with the following string in your xml colinux config file !

TomasEbenlendr: Explore2Fs (1.00 pre6b) reports same partition numbers as should be used in this configuration. (E.g.:my disk hda1/ext2 hda2/NTFS hda3(hda5/ext3 hda6/VFAT hda7/VFAT) is reported by Explore2Fs like hda1/ext2 and hda3/ext3)

Mabster: After a lot of playing around with the \Device\HarddiskN\PartitionX to get it to work I thought I'd share my experience. On my machine my Linux partitions reside in between my other partitions, all of which are mapped under Windows. I found the script at Managing Disk Partitions to be pretty helpful in diagnosing what was going on. It turns out that Windows first allocated Partition0 to the entire drive. Then all the mapped partitions (my C: and D:) are mapped from there (Partition1 and Partition2). Then the unallocated partitions are all mapped from there. So my /boot, / and swap partitions turned out to be 3,4&5.

atzz: Here is an easy way to determine internal partition names on Windows.
Download WinObj. This is an utility from the collection of free tools developed by Sysinternals (now owned by Microsoft).

Run WinObj and open GLOBALS?? folder in it. There will be a lot of stuff, and among that stuff -- symbolic links with names corresponding to Windows drive letters. For example, I have three drive letters:

coLinux currently doesn't support running an X server that requires a graphics adapter, because such a virtual adapter is not included. (On the other hand, a proof-of-concept 'case study' implementation of the fbdev interface was started by Nuno Lucas towards the end of 2005. It is in the nlucas branch on svn. On cofb branch, it is ported to 0.8.0 with 2.6.28 kernel) If you want to use X, you can run an X server under Windows, such as Cygwin/X or Xming, and launch an X session across the virtual network. You can also run the X server Xvnc (aka vncserver) in your colinux environment and use a VNC client for Windows to connect to it.

You can find much more information on using X on the wiki page X with coLinux.

Q5. Why am I getting memory allocation errors from the Linux kernel when I try to run a number of heavy programs? Edit

Q6. Is the amount of physical RAM (besides swap) available to coLinux on Windows limited to around 32MB? Edit

No. There was once such a limit. The reason was that there are limitations enforced by Windows's non-cached memory allocator. This pool is hardcoded to a limit of 256MB and even 128MB on some systems. Allocating too much memory from that pool can destabilize Windows.

But at least since mid-2006, coLinux has allocated memory in a different way, so this limitation is no longer present. Users have allocated more than 512 megabytes of memory to coLinux without problems. Of course, you must leave some RAM for Windows and take the file cache into account.

Q7. Some functionality still does not work or is not implemented. Why? Edit

coLinux is still in its early development stage. Although it is usable, we have not yet implemented some parts of it.
You can download the latest released version from sourceforge
or unannounced development snapshots from our web site.

Q8. I need some help configuring networking with the coLinux machine. Edit

Reported by Jonathan Ballard
> In the /etc/fstab the entry for the /dev/cobd0 was
> something like:
>

/dev/cobd0 / ext2 defaults 0 1

>
> Change the ext2 to ext3.
>

/dev/cobd0 / ext3 defaults 0 1

>
> A few more things should work fine.

Reported by Karol Bryd
> This is because the initscripts package got updated and
> /etc/init.d/checkroot.sh also, just edit it and change the line with
> "rootcheck=yes" to "rootcheck=no".

(Mukesh Agrawal) I ran into this problem as well. But it turned out that I was giving my root partition the wrong alias. Fixing this made the problem go away. (The config.xml file specified the alias as hda5, but fstab wanted to mount hda6 onto root.)

A limited port to Windows 98/ME is possible, but that would require lots of work. NT supports asynchronous operations and security attributes in many interfaces. 98 & ME do not have such options available or they are otherwise limited. New code would have to be written to simulate the asynchronous operations. The code could not be considered as secure for kernel level execution because of the absent security options. For any detailed differences, reference the manuals at the MSDN Library.

Q12. My coLinux installation doesn't boot, and I get a strange error in the Command Prompt window. What's wrong? Edit

Sometimes this is caused by problems in the XML config file (default.colinux.xml). You might see errors like these:

When editing the XML config file with Notepad or WordPad on Windows, CR/LF line terminators (DOS format), instead of just LF (Unix), may cause problems. Re-edit the original file with Notepad and cut/copy/paste using only LF characters (look like narrow rectangles in Notepad). (You can get UDDU.ZIP to convert to/from DOS/Unix formats from this webpage.)

block_device for a swap file is defined in the XML config file, but this file doesn't exist. Edit or remove this definition.

You may have erased the 'DosDevices' that can be found in the 'path=' command : <block_device index="0" path="\Dos Devices\C:\yourcolinuxpath\root_fs"> provided you've installed your coLinux in C:\yourcolinuxpath, of course

The file name of the root image file is incorrect. Edit the config file to fix this.

You have specified a compressed root image file. Decompress with winzip, winrar or your favorite compression utility and and specify the uncompressed filename in the config file.

One report of incorrect file permissions (no write access) on the root image file unzipped with Cygwin. This was fixed using Cygwin's chmod command.

A message similar to example 1 above though including the message "mount: Mounting /dev/cobd0 on /mnt/linux failed: No such device" followed by VFS: Cannot open root device "cobd0" or unknown-block(117,0) was in my case caused by leaving off the closing double quote in the config file line, e.g. cobd0="c:\location\file

If you get this message, you're not running coLinux with Administrator privileges:

Error, unable to determine if driver is installed (rc -19)

coLinux needs Administrator privileges to run under Windows. This is because (quoting from Dan's explaination on the main webpage under "How does it work") "special driver software on the host operating system is used to execute the coLinux kernel in a privileged mode (known as ring 0 or supervisor mode)." It is possible to start co Linux as a service under Windows using the Cygwin service tools. Please look at this thread on the developer's mailing list to learn the "formula."

If you get a bunch of VFS: Can't find * filesystem errors, check if your root is unbzip2ed. The installer might have downloaded a .bz2 file for you. You need to bzip -d it and use that as a root image (without .bz2).

Q13. My coLinux installation seems to randomly and irregularly hang my PC. Sometimes it happens when the init scripts are running during bootup or shutdown, sometimes it happens while a program is executing on the co Linux VM, and sometimes coLinux runs just fine. What's going on and how do I fix it? Edit

Most frequently, this is caused by minor problems coLinux has running on multi-processor systems. You probably have two or more CPUs and are running an SMP configuration under Windows, or have a recent Intel processor with Hyperthreading enabled in your BIOS settings.

If you have multiple logical or physical CPUs in your system, check to see if you are running coLinux version 0.6.1 or later. A fix was added to pin the coLinux process to one CPU.

If you still encounter problems (or if you are running an older version of coLinux), you can disable Hyperthreading in your system's BIOS, or you can edit your boot.ini file and add the '/ONECPU' switch to disable multiprocessor support in Windows. (See this webpage for more info.) (Additional info from Windows experts is welcome :^)

(Suggestion: Some software vendors, eg Cakewalk, have temporarily worked around this issue by "locking" their application into a single processor or one side of the hyperthreading. I don't know the details, but it might be worth finding out what they did and applying the same stopgap to coLinux. -- JosephKesselman)

(The "imagecfg" utility seems to be able to do just that. --Hexchild)

Q14. I think I've configured my configuration file correctly to access a partition on my hard drive as a block device. But I can't mount the filesystem on the corresponding cobd device. It fails with an error like "Can't read superblock." What's wrong and how do I fix it? Edit

If you're currently accessing a partition (that is, a drive) in Windows, you won't be able to mount it in coLinux because Windows locks the resource. Be sure to close any folder windows or instances of Explorer that are referencing that drive, and change drive letters away from that drive in any open Command Prompt windows. Then your mount command should succeed.

Also, in version 0.6.0, the size of a raw partition is sometimes incorrectly reported, causing reiserfs partitions to fail to mount.

Q15. Can coLinux be used with multiple alternative configuration files? Edit

Yes. In versions prior to 0.7.1, you can start colinux with

colinux-daemon.exe -c c:\pathTo\other.colinux.config

substituting the name of your configfile for c:\pathTo\other.colinux.config. In versions 0.7.1 and later, you use colinux-daemon @c:\pathTo\other.colinux.conf. You can then create .bat files or shortcuts with this command for easy click-and-run starting of various setups.

Q16. I get memory allocation issues within coLinux when trying to use real-world software like KDE application. Edit

The memory settings currently suggested for the coLinux virtual machine range from 64 Mb (Windows machines with 160 Mb of RAM or more) to 128 Mo (Windows machines with 256 Mb of RAM or more), or even more.

Demanding applications, like X and heavy-duty graphical applications, or the gcc compiler, can beg for much memory, causing the Linux system to run out of memory. As in real Linux systems, that is what the swap file is for, and coLinux will happily use it.

If it is there, and enabled, of course.

So, check with the free command, or use the top command to see how much RAM is being used and by which process. You will also see if swap is enabled or not.

Q17. I see Cygwin mentioned every now and then. Do I need it to use coLinux? Edit

Ok, Cygwin is indeed mentioned on several pages in this Wiki, and also often mentioned on the mailing lists and maybe even in the official documentation and web site. You can also notice it quite often in screenshots.

BUT you don't need it to install and use coLinux at all. There was a dependancy on cygwin.dll long ago, but it's gone by now.

Cygwin is like a Swiss-army knife, it really deserves its own page but in short, it provides you with :

bash and Unix-like file completion - a real shell you can use instead of good old cmd.exe (though PowerShell crushes it under its mighty heel. :) -- Mr64)

many handy Unix command-line tools (dd, tar, gzip, zip/unzip, bzip2/bunzip2, md5sum, whois...) but you can get the same functionality elsewhere too

an X Window server is available too, even if it is not the fastest X Window server you can find for Windows

the GNU C/C++ compiler suite, while not stricly needed either, allows you to build other packages like e2fsprogs to create, format, check, enlarge coLinux images...

so in short, it is very handy and indeed many coLinux users are also heavy Cygwin users.

oh, Cygwin is mostly GPL, with some parts with other rather similar licences (Apache, X11).

(This answer is out of date. The following info from the colinux-daemon.txt included with coLinux 0.7.1 should probably be incorporated into the answer:

initrd=<path to initrd file>

This specifies the path to the initrd file.

The file initrd.gz from coLinux installation upgrades your
kernel modules for this snapshot. After first run of a new
coLinux version, you can remove this parameter from your config.

Example: initrd=initrd.gz)

modules are bits of kernel code that can be dynamically loaded and unloaded on demand. You can think of them as kernel drivers or system DLLs, but anyway they are just files.

since coLinux works in an unusual way from a Linux point of view (the kernel is this file called vmlinux and is "outside" any Linux partition), coLinux modules currently have to be "injected" into your co Linux filesystem and stored into a directory named /lib/modules/ <kernel-version>-co-<coLinux-version>, for example : 2.6.7-co-0.6.2

coLinux usually ships with a vmlinux-modules.tar.gz file containing modules

as for snapshot 040622, they include :

support for some filesystems including NTFS, XFS, NFS and Minix (boot floppies)

various cryptography modules,

net drivers, some netfilter stuff...

to install them, copy the archive vmlinux-modules.tar.gz into coLinux and extract the files to the right location, similar to /lib/modules/2.6.7-co-0.6.2

The kernel included with coLinux should work for most people, but some people might need to roll their own. Here is a quick overview of how to build a Linux-2.6.22.18 kernel that works with coLinux.
Please have a look into file doc/building in coLinux source for more details.

Set up a development environment with GCC 3.4.x, GCC 4.1.2 (or later). CoLinux driver does not run with GCC 3.3.x and before.

Extract it on your development platform into a new empty directory under your users HOME directory. Please do this not as root.

Change into directory coLinux-0.7.3 and run ./configure. Ignore warnings about host gcc or so. But, the check "gcc for kernel" must pass.

Run make kernel. This downloads kernel source, extracts it, patches it and starts the building. Lets run to the end, to see that the coLinux default kernel can build.

Copy the file vmlinux from directory linux-2.6.22.18-build via cofs into your Windows into same directoy where the default kernel vmlinux exist. But, rename the original file into vmlinux-orig to have a backup for failures!

Reboot coLinux and test our self made kernel now. If that is working, you are ready for changes on the kernel config.

Change into directory linux-2.6.22.18-build and run make menuconfig. If you have X11 graphics running, then run make xconfig.

A good idea is to add our own text to kernel version into CONFIG_LOCALVERSION=-my. This avoids problems with default coLinux modules.

You probably don't want to mess with Processor Type - coLinux can crash if the kernel tries to use processor features that coLinux isn't expecting the kernel to mess with. You can enable /dev/cpu/*/cpuid, but I suggest not messing with anything else. Make sure to leave COPIC Support enabled.

Q23. How can I mount a CD/DVD-Drive to use apt Debian-DVDs (for example) ? Edit

Inside coLinux you can mount for sample as /dev/hdc or /dev/cobd4. On some distries use /media/dvd, on others is /media/cdrom, or /cdrom. On linux is this for sample:

mount /dev/hdc /media/cdrom -o ro

Q24. Can I run coLinux natively from within an NTFS partition without creating a 'block device' or hard disk image ? Edit

NO, if you mean in a subdirectory. Booting Linux needs a Linux filesystem with extended attributes for user permissions, special files such links and more. All of this can't be done on NTFS. Not in the current release anyway.

But you can connect a USB-Harddisk (or big USB-stick) and use coLinux on this in a partition.

Check if you are running VPN software. Some VPN software is very intrusive with the windows network stack.
It is easy to check if that is the problem, because colinux will start work as soon as the VPN software is shut down.

Sorry to dissapoint, when it's ready coLinux will really be able to benefit from systems with > 4Gb RAM.

Q28. How can I increase the size of a coLinux block device image? Edit

See ExpandingRoot (nowadays it is possible to resize an ext2 or ext3 partition, sometimes even "in place" while it is mounted). If you do not want to do that:

From windows, create a blank file of the new size. For 5GB=5*1024*1024*1024 bytes, open a command prompt and run fsutil file createnew C:\??? 5368709120. (If you do not have fsutil, see HowtoCreateSwapFile.)

Edit the colinux configuration file to add the blank file as a new device, for example cobd1=New.img, and restart colinux.

If you can, switch into single user runlevel. init s (or shutdown now)

Format filesystem. mkfs.ext3 /dev/cobd1

Mount it. mkdir /tmp/mnt; mount /dev/cobd1 /tmp/mnt(Do not mount it on mnt: the cp -x would not work there)

Copy contents to new device. cp -ax / /tmp/mnt

Only in udev systems: Copy device nodes. cp -a /dev/* /tmp/mnt/dev/

Check that the file /tmp/mnt/etc/fstab does not have 'labels'. Use only /dev/cobd... there.

Check the used sizes with df

Let's sync data, a saver step for some systems. sync

Unmount new device. umount /dev/cobd1

Shuting down coLinux. shutdown -h now

From windows, edit your config file again. Change the entry of the old device to use the newly created file. Then remove the entry created above.

Restart coLinux.

Keep the old file until you are sure the new one works!

You can also avoid "disk space" problems by creating new image files and mounting them appropriately instead of having one single large image file. You have to remember to edit the cobd configuration parameters of colinux-daemon and add new entries into /etc/fstab in the root image file accordingly. One possibility when "disk space" in the single large image file becomes scarce is to separate /usr from it into its own image file.

After typing "apt-get update" and "apt-get upgrade" you might see this warning message:

LILO configuration

It seems to be your first LILO installation. It is absolutely necessaryto run liloconfig(8) when you complete this process and execute/sbin/lilo after this.

LILO won't work if you don't do this.

<Ok>

I did NOT follow this advice (and my system works!). You probably ought not to do the above.

In fact you don't need ANY boot loader installed for a colinux installation, you can safely remove LILO, Grub and any other boot manager from inside coLinux. Booting colinux is just like using the old loadlin.exe, nothing is needed inside linux because everything required is outside.

(found at the mail list)
When you want to compress an imagefile: for example you compress your fresh installed image file so you can decompress it and have a fresh installation.
It can become big because the empty space is not really zero so your compressor makes the file big.

start with another image file and set the image you want to compress in the xml conf file in this example hda2

If you are using Windows 2000 or XP, you can either mark your disk image files as compressed or you can place the image files in a compressed directory. This will incur a performance hit, but will allow you to save possibly a lot of disk space. To mark a file or directory as compressed, right-click on it in Explorer, select "Properties", then click the "Advanced..." button on the General tab, and check the box labeled "Compress contents to save disk space".

To make the most of a compressed disk image, it helps to zero out the unused space, as mentioned above. Here's a quick command to zero out the unused space in a running system:

{ dd if=/dev/zero of=/zero & }; sleep 1; rm /zero; fg

By removing the /zero file shortly after it's created, we ensure that the file will be deallocated from the system as soon as "dd" exits.

Here's a script that does the same thing, but displays a handy running percentage as it executes:

However, if you're doing this there are things to beware of; firstly, compressed files on windows get VERY fragmented and so can impact the performance of other applications too. And secondly, some people have reported that windows gives disk errors (they look like hardware errors) with very large compressed files (15Gbyte or more) but give no errors when the file is uncompressed (note this may still be hardware related despite the suspicious circumstances). <RDB>

(Has anyone tried marking the disk image as an NTFS sparse file? That could save a whack of space with big images that have little data in them. They'll "grow" as the filesystem fills, ala VHD or VMDK. -- Mr64)

More than half the Windows users have Spyware on their computers which they will never be able to remove completely from their system (except for erasing all data and reinstalling their system from scratch), even by using a whole Armada of anti-spyware and antivirus programs like AdAware, Spy Sweeper, Spybot Search & Destroy, Antivirus, Norton Antivirus etc. Moreover, there's the ever-increasing Microsoft espionage built into the system -- let alone Windows Vista.

No, CoLinux is able to use only one CPU. Bear this in mind when speccing a machine to run coLinux on. A quad-core processor might seem like a good idea, however the more cores you have, the slower they are clocked. And coLinux is only going to be able to run on a single core.