coLinux 0.6.4 and before with XML configuration[]
Old coLinux versions up to 0.6.4 used XML file as configuration. We stuck this old UserConfigs here. The current should only have the new plain text formats for version 0.7.1 and later.
LAN with NAT[]
I had a tough time getting colinux networking to work through my wireless LAN since I already use NAT and the colinux NAT conflicts with it.
I solved the problem by changing the coLinux NAT IP address range from 192.168.0.X to 10.10.10.X i.e. the coLinux IP went from 192.168.0.40 to 10.10.10.40 and then it works just fine.
I launch colinux using the following bat file:
netsh interface ip set address name = "TAP Connection" source = static addr = 10.10.10.1 mask = 255.255.255.0 colinux-daemon.exe -t nt
Here is the coLinux config file:
cobd0="d:\coLinux\debian-3.0r0.ext3" cobd1=d:\coLinux\colinux-swap root=/dev/cobd0 kernel=vmlinux mem=64 eth0=tuntap,"TAP"
Here is the debian /etc/network/interfaces file:
auto lo eth0 iface eth0 inet static address 10.10.10.40 gateway 10.10.10.1 netmask 255.255.255.0 iface lo inet loopback
Here is the output of ipconfig on Windows 2000:
Windows 2000 IP Configuration Ethernet adapter TAP Connection: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : TAP-Win32 Adapter Physical Address. . . . . . . . . : 00-FF-67-BA-0E-76 DHCP Enabled. . . . . . . . . . . : No IP Address. . . . . . . . . . . . : 10.10.10.1 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : DNS Servers . . . . . . . . . . . : Ethernet adapter Cisco Aironet: Connection-specific DNS Suffix . : Description . . . . . . . . . . . : Cisco Systems 350 Series PCMCIA Wireless LAN Adapter Physical Address. . . . . . . . . : 00-09-B7-02-54-5F DHCP Enabled. . . . . . . . . . . : Yes Autoconfiguration Enabled . . . . : Yes IP Address. . . . . . . . . . . . : 192.168.0.100 Subnet Mask . . . . . . . . . . . : 255.255.255.0 Default Gateway . . . . . . . . . : 192.168.0.1 DHCP Server . . . . . . . . . . . : 192.168.0.1 DNS Servers . . . . . . . . . . . : 192.168.0.1
Here is the debian ifconfig output:
eth0 Link encap:Ethernet HWaddr 00:43:4F:4E:45:30 inet addr:10.10.10.40 Bcast:10.255.255.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1 RX packets:43 errors:0 dropped:0 overruns:0 frame:0 TX packets:9 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:4298 (4.1 KiB) TX bytes:798 (798.0 b) Interrupt:2 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
Hope this helps anyone with a similar problem
home notebook with 512MB RAM[]
Here's a working colinux config file from tdeagan's XP home notebook with 512MB RAM (tim at deagan dot net) that sets the colinux machine up for:
- 82MB of memory (hey, that's the best it seemed to be stable with)
- A second 1GB cobd file that got wiped and remounted as /usr after copying the original /usr to it
- A swapfile -- look up how to make this image in the devlist archive or look at this Wiki page.
cobd0="e:\coLinux\Debian-3.0r0.ext3.1gb" cobd1="e:\colinux\Debian-3.0r0_mod.ext3.1gb" cobd2="e:\colinux\swapfile.image" mem=82 root=/dev/cobd0 kernel=vmlinux eth0=tuntap,"TAP"
I also use a cygwin.bat (or cygwin.cmd) file that allows me to get ncurses to work right (note env variable set up prior to running cygwin):
@echo off C: chdir C:\cygwin\bin set CYGWIN=codepage:oem bash --login -i
Hope this helps someone
Networking with Gentoo[]
Here is mine, with successful networking with gentoo (not finished, but working)
- Windows configuration
Configuración IP de Windows 2000 Ethernet adaptador internet: Sufijo DNS específico de la conexión. : WorkGroup Dirección IP. . . . . . . . . . . . . : 192.168.2.13 Máscara de subred . . . . . . . . . . : 255.255.255.0 Puerta de enlace predeterminada . . . : 192.168.2.1
- Linux configuration
eth0 Link encap:Ethernet HWaddr 00:4A:41:52:45:4B inet addr:192.168.2.14 Bcast:255.255.255.255 Mask:255.255.255.0 UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1 RX packets:53 errors:0 dropped:0 overruns:0 frame:0 TX packets:48 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8750 (8.5 Kb) TX bytes:5008 (4.8 Kb) Interrupt:2 lo Link encap:Local Loopback inet addr:127.0.0.1 Mask:255.0.0.0 UP LOOPBACK RUNNING MTU:16436 Metric:1 RX packets:0 errors:0 dropped:0 overruns:0 frame:0 TX packets:0 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:0 RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)
- Cfg file:
cobd0="d:\coLinux\gentoo-i586-ext3-2g-deluxe" cobd1="d:\coLinux\swap_256M" kernel=vmlinux mem=64 eth0=pcap-bridge,"NDIS",00:4A:41:52:45:4B
Gentoo[]
I use this configuration file for gentoo.colinux.conf:
#------------------------------------------------------------------------------# # This line must specify the swap file to use (256MB). # # Inside coLinux it will be /dev/cobd0. # #------------------------------------------------------------------------------# cobd0="C:\Projects\colinux\FileSystems\0.swap_fs-256MB" #------------------------------------------------------------------------------# # These lines specify the several filesystems to use. # # Specified ~FileSystem Partitions will be: # # /boot - 64MB # # /root - 1GB # # /usr - 2GB # # /var - 1GB # #------------------------------------------------------------------------------# cobd1="C:\Projects\colinux\FileSystems\1.boot_fs-64MB.ext2" cobd2="C:\Projects\colinux\FileSystems\2.root_fs-1GB.ext2" cobd3="C:\Projects\colinux\FileSystems\3.usr_fs-2GB.ext2" cobd4="C:\Projects\colinux\FileSystems\4.var_fs-1GB.ext2" cobd5="C:\Projects\colinux\FileSystems\mandrake-10.0-rescue" #------------------------------------------------------------------------------# # These lines can specify additional Block Devices with Index equal or higher # # than index 6, for Hardware Devices such as Floppy Disk Drives or CD-ROMs. # #------------------------------------------------------------------------------# cobd6="\Device\Floppy0" cobd7="\Device\CdRom0" #------------------------------------------------------------------------------# # This line specifies the Boot Parameters to pass to Kernel. # # After Gentoo is installed, the Root Parameter points to /dev/cobd2. # #------------------------------------------------------------------------------# root=/dev/cobd5 # root=/dev/cobd2 #------------------------------------------------------------------------------# # This line specifies the Kernel Image to boot. # # Other Kernel images can be set, but Windows must have access to them. # #------------------------------------------------------------------------------# kernel="vmlinux" #------------------------------------------------------------------------------# # This line specifies the amount of memory available to coLinux. # # Usually, set SWAP Partition to 2x the Memory Size available to coLinux. # #------------------------------------------------------------------------------# mem=64 #------------------------------------------------------------------------------# # This line specifies the networking parameters. # #------------------------------------------------------------------------------# # The coLinux NIC is DHCP enabled, bridged with the Windows Host NIC. # #------------------------------------------------------------------------------# eth0=pcap-bridge,"Broadcom ~NetXtreme Gigabit Ethernet" # #-----------------------------------------------------------------------------# # Company: ~DoWeDo-IT # # Project: Gentoo 2004.1 on coLinux 0.6.1 # # Filename: gentoo.colinux.xml # # Author: José Carlos Monteiro # # ~mailto:Jose.Monteiro@~DoWeDo-IT.com Mob: +351.91.776-5726 # #-----------------------------------------------------------------------------# # Description: This configuration file is ready for a Gentoo installation # # from scratch, using Mandrake 10.0 Linux Rescue Disk. # #-----------------------------------------------------------------------------# #
Transparent bridging example[]
Transparent bridging example. This essentially gives my colinux instance its own nic.
cobd0="C:\Program Files\coLinux\Debian-3.0r0.ext3.1gb" cobd1="c:\Program Files\colinux\swap_device" root=/dev/cobd0 kernel="vmlinux" mem=64 # specify the name and mac of the physical interface that we want to bridge onto # eth0=pcap-bridge,"Intel 8255x-based PCI Ethernet Adapter (10/100)",00:50:8D:48:BF:3A
Debian[]
My configuration of coLinux using the Debian image.
It took me a long time before I understood how networking worked, but it is in fact very simple.
My Windows computer is running ICS (Internet Connectivity Sharing), so I have two network card:
- NVIDIA nForce MCP Networking Controller (connected to my cable modem)
- Marvell Yukon Gigabit Ethernet (connected to my Linksys 5-port workgroup switch)
I wanted my coLinux to be able to access the net. So I bridge it to the LAN NIC (192.168.0.1), giving it a random mac address (not the same as the Marvell as I originally thought!). Very simple!
Now, when I start coLinux, I can either get a DHCP address from Windows ICS or set an IP in the range 192.168.0.0/24.
File: /etc/network/interfaces
# Used by ifup(8) and ifdown(8). See the interfaces(5) manpage or # /usr/share/doc/ifupdown/examples for more information. auto lo eth0 #iface eth0 inet dhcp iface eth0 inet static address 192.168.0.4 gateway 192.168.0.1 netmask 255.255.255.0 iface lo inet loopback
File: colinux.conf
# My Windows OS and Program Files is on F:\ # eth0="f:\Program Files\coLinux\Debian-20040605-mit.ext3.1610mb" cobd1="f:\Program Files\coLinux\swap_device" root=/dev/cobd0 kernel="vmlinux" mem=64 # The magic of bridging # eth0=pcap-bridge,"Marvell",00:43:4F:4E:45:31
File startup.bat (one click startup of my Linux daemon):
colinux-daemon @colinux.conf -t nt -d
See also: Network Description 2
Knoppix? Replace vmware given RH9?[]
Does anyone have a working config for knoppix?
Does anyone have a working config to replace vmware given RH9 installed on partitions 2/3/4?
Need COFS example[]
We need to Insert an XML config file with a COFS setup here.. I'm trying to get one running. Either that, or offer a CommandLineReference on the wiki, because I'm trying to get COFS running and am currently using an XML file. I might convert over to using command line arguments for the time being, if it's easier to get COF working.. we should have more info on the wiki here about the available command line arguments in Command Line Reference --LarsOlson.
There is a brief explanation here:
In XML file can't setup cofs. Cofs is only working on commandline parameter or in new plain text configs.
For the newest version of coLinux do this:
Edit coLinux.config file (or whatever you choose to name the file) - Add one line like this:
cofs0=c:\
Now start coLinux and type this:
mkdir /mnt/windows mount -t cofs 0 /mnt/windows
To "use" what you just did type this:
ls -l /mnt/windows
That will give you a directory listing of your c:\ drive. You can specify a "non-root drive directory" (EG: c:\somewhere) and then type the remaining commands the same way.
Then when you type "ls -l /mnt/windows" the directory c:\somewhere will be the "psuedo-root-directory" - by that I mean that you can NOT type "ls -l /mnt/windows/.." and view the directory "c:\" .
That protects your "c:" drive's root directory (not to be confused with coLinux's "/" directory or coLinux's "/root" directory _OR_ any directory owned by "root" ;-) ).
Debian again[]
- ) Another satisfied customer :) Here's my Config File in full for anyone who wants to see it... I was kicking myself in the ass because I didn't realize you have to EXTRACT THE DEBIAN KERNAL BEFORE YOU CAN USE IT!
cobd0="E:\Program Files\coLinux\Debian-3.0r2.ext3-mit-backports.1gb" root=/dev/cobd0 initrd="initrd.gz" kernel="vmlinux" mem=64 eth0"=tuntap
Mepis?[]
Can anyone help me? I need a Config that will work with MEPIS, on a dual-boot Win-XP Home PC
Networking with SLIRP (for Internet) and TAP (for X server)[]
TAP configuration in Windows (see note 1):
IP address: 192.168.37.10 Subnet mask: 255.255.255.0 Default gateway: 192.168.37.10
colinux config file part:
eth0=slirp eth1=tuntap
I use Xming for my X server:
Xming.exe -ac -fullscreen -clipboard
In colinux, with Debian:
In /etc/network/interfaces:
auto eth0 iface eth0 inet dhcp auto eth1 iface eth1 inet static address 192.168.37.20 netmask 255.255.255.0 network 192.168.37.0 broadcast: 192.168.37.255 #gateway 192.168.37.10
To run an X client:
~$ export DISPLAY=192.168.37.10:0 ~$ xterm
In colinux, with Gentoo:
In /etc/conf.d/net (see note 2):
config_eth0=( "dhcp" ) config_eth1=( "192.168.37.20/24")
In /etc/ssh/sshd_config (see note 3):
X11Forwarding yes HostKey /etc/ssh/ssh_host_dsa_key ServerKeyBits 2048 PermitRootLogin no RSAAuthentication no PasswordAuthentication no UsePAM yes
I'm not sure how much of that is necessary. I got it from http://www.gentoo.org/proj/en/infrastructure/config-ssh.xml
To run an X client:
~ # /etc/init.d/net.eth1 start ~ # /usr/sbin/sshd
Start PuTTY in Windows and log in as user.
~$ export DISPLAY=192.168.37.10:0 ~$ xterm
Notes:
1. In the IP addresses , 37, 10 and 20 are arbitrary. I took them from the examples on the Network page. 2. In my Gentoo image there was no eth1 device, so I had to generate it myself: cd /etc/init.d ln -s ./net.lo net.eth1 3. In Gentoo, I couldn't get colinux to open the display, without using ssh. There was no ssh host key, so I had to generate it myself: ssh-keygen -b 1024 -f /etc/ssh_host_key -N
CONF for Networking with SLIRP, port forwarding, and COFS for 0.7.1[]
First off, this is my first Wiki entry ever, so please pardon my n00b-ness, :)
I've been using Linux for almost 12 years, and Cygwin for about 5 and so the discovery of coLinux was very exicting for a geek like myself.
I've got coLinux running on my Dell laptop, which alternates from a wireless home network with a static IP Address, a wired work network with a DHCP IP Address, and a wireless work network with a DHCP IP Address. I needed a way to keep things simple, without having to add even more networking components such as TAP, the MS Loopback Adapter, bridging network devices, or anything else for that matter.
I chose to stick with just a SLIRP setup, but still wanted to take advantage of things like a native Linux version of SSH, Apache, etc. that I could use for development purposes, as well as giving outside users remote access to my laptop when necessary.
My Windows laptop c:\windows\system32\drivers\etc\hosts file:
# Default entry, loopback adapter: 127.0.0.1 localhost localhost # Secondary entry, this is my coLinux box: 127.0.0.2 kraden.somedomain.com kraden # Home network ## Router 172.16.0.1 gateway.somedomain.com gateway ## Desktop 172.16.0.3 desktop.somedomain.com desktop ## The boys' media center PC 172.16.0.4 theboys.somedomain.com theboys ## Laptop, static wireless IP Address 172.16.0.5 koloth.somedomain.com koloth ## u/stairs WAP 172.16.0.98 wap1.somedomain.com wap1 ## d/stairs WAP 172.16.0.99 wap2.somedomain.com wap2
I've got Fedora release 7 (Moonshine), Linux 2.6.12-co-0.7.1 #1 Sat Jul 14 12:13:49 UTC 2007 i686 i686 i386 GNU/Linux, running under coLinux.
My coLinux configuration file:
# Fedora 7 configuration file # colinux-daemon @ fedora.conf # # Full list of config params is listed in colinux-daemon.txt. # # eth0=slirp,,tcp:22:22 kernel=vmlinux initrd=initrd.gz mem=192 cobd0="D:\Program Files\coLinux\Fedora-7.img" cobd1="D:\Program Files\coLinux\swap.img" # Export my home directory for use under coLinux cofs0="D:\profiles\bossman" root=/dev/cobd0 ro # Map port 22 and port 80 so that we can pass traffic through # from the host PC eth0=slirp,,tcp:22:22/tcp:80:80
My coLinux /etc/hosts file:
# Loopback adapter # 127.0.0.1 localhost.localdomain localhost # coLinux network # ## "Host PC" (aka, laptop) 10.0.2.2 hostpc.somedomain.com hostpc ## coLinux eth0 10.0.2.15 kraden.somedomain.com kraden # Home network ## Router 172.16.0.1 gateway.somedomain.com gateway ## Desktop 172.16.0.3 desktop.somedomain.com desktop ## The boys' media center PC 172.16.0.4 theboys.somedomain.com theboys ## Laptop, static wireless IP Address 172.16.0.5 koloth.somedomain.com koloth ## u/stairs WAP 172.16.0.98 wap1.somedomain.com wap1 ## d/stairs WAP 172.16.0.99 wap2.somedomain.com wap2
The /etc/sysconfig/iptables file from coLinux/Fedora:
# IPTables rules *filter :INPUT DROP [0:0] :FORWARD DROP [0:0] :OUTPUT ACCEPT [0:0] -A INPUT -i lo -j ACCEPT -A INPUT -s 10.0.2.2 -p tcp -m tcp ! --tcp-flags FIN,SYN,RST,ACK SYN -m state --state NEW -j DROP -A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT ## Restrict access to port 22 to just the host PC -A INPUT -s 10.0.2.2 -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT ## If you want to allow access to port 22 to everyone, bang out ## the above rule, unbang the following rule, then restart IPTables: ##-A INPUT -p tcp -m tcp --dport 22 -m state --state NEW -j ACCEPT ## Restrict access to port 80 to just the host PC -A INPUT -s 10.0.2.2 -p tcp -m tcp --dport 80 -m state --state NEW -j ACCEPT ## If you want to allow access to port 80 to everyone, bang out ## the above rule, unbang the following rule, then restart IPTables: ##-A INPUT -p tcp -m tcp --dport 80 -m state --state NEW -j ACCEPT -A OUTPUT -o lo -j ACCEPT COMMIT
The /etc/fstab file from coLinux/Fedora:
/dev/cobd0 / ext3 defaults 1 1 tmpfs /dev/shm tmpfs defaults 0 0 devpts /dev/pts devpts gid=5,mode=620 0 0 sysfs /sys sysfs defaults 0 0 proc /proc proc defaults 0 0 /dev/cobd1 swap swap defaults 0 0 cofs0 /home/bossman/.windows cofs uid=bossman,gid=bossman,dmask=0700,fmask=0600
And finally, the /etc/ssh/sshd_config file from coLinux/Fedora:
# $OpenBSD: sshd_config,v 1.74 2006/07/19 13:07:10 dtucker Exp $ # This is the sshd server system-wide configuration file. See # sshd_config(5) for more information. # This sshd was compiled with PATH=/usr/local/bin:/bin:/usr/bin # The strategy used for options in the default sshd_config shipped with # OpenSSH is to specify options with their default value where # possible, but leave them commented. Uncommented options change a # default value. Port 22 Protocol 2 # # SyslogFacility # Gives the facility code that is used when logging messages from sshd(8). The possible values are: # DAEMON, USER, AUTH, AUTHPRIV, LOCAL0, LOCAL1, LOCAL2, LOCAL3, LOCAL4, LOCAL5, LOCAL6, LOCAL7. The # default is AUTH. # SyslogFacility AUTHPRIV StrictModes yes UsePrivilegeSeparation yes AuthorizedKeysFile .ssh/authorized_keys # Only allow my user account SSH access AllowUsers bossman PermitRootLogin no PermitEmptyPasswords no # Disable password auth, as we're only going to allow # private/public key auth. PasswordAuthentication no PubkeyAuthentication yes RSAAuthentication no GSSAPIAuthentication no GSSAPICleanupCredentials no ChallengeResponseAuthentication no UsePAM no AcceptEnv LANG LC_CTYPE LC_NUMERIC LC_TIME LC_COLLATE LC_MONETARY LC_MESSAGES AcceptEnv LC_PAPER LC_NAME LC_ADDRESS LC_TELEPHONE LC_MEASUREMENT AcceptEnv LC_IDENTIFICATION LC_ALL AllowTcpForwarding no X11Forwarding yes Subsystem sftp /usr/libexec/openssh/sftp-server
With this setup my laptop and my coLinux can always communicate, even if I don't have a network connection at all. I mount the COFS file system under my /home/bossman/.windows directory upon bootup of coLinux which is running as a system service on my laptop. But if you didn't want to run things on startup, you could use the following from a command prompt or shortcut:
colinux-daemon.exe @fedora.conf
With my home directory under Windows being mounted within coLinux, it allows me to access the same files, in the same locations as I do from a shell prompt under Cygwin:
drwx------ 6 bossman bossman 4.0K 2007-12-21 15:16 ./ drwxr-xr-x 4 root root 4.0K 2007-12-18 10:33 ../ lrwxrwxrwx 2 bossman bossman 4.0K 2007-12-24 09:59 .nano -> .windows/.nano/ lrwxrwxrwx 2 bossman bossman 4.0K 2007-12-18 12:26 .nedit -> .windows/.nedit/ lrwxrwxrwx 2 bossman bossman 4.0K 2007-12-21 09:25 .ssh -> .windows/.ssh/ drwx------ 1 bossman bossman 0 2007-12-21 15:15 .windows/ -r-------- 1 bossman bossman 2.2K 2007-12-21 15:05 .aliases -r-------- 1 bossman bossman 2.7K 2007-12-21 15:16 .aliases,v -rw------- 1 bossman bossman 38K 2007-12-24 10:02 .bash_history -r-------- 1 bossman bossman 33 2007-12-04 22:17 .bash_logout -r-------- 1 bossman bossman 248 2007-12-21 09:37 .bash_logout,v -r-------- 1 bossman bossman 2.7K 2007-12-20 19:15 .bash_profile -r-------- 1 bossman bossman 3.3K 2007-12-20 19:16 .bash_profile,v -r-------- 1 bossman bossman 1.4K 2007-12-20 14:47 .bashrc -r-------- 1 bossman bossman 1.6K 2007-12-20 14:49 .bashrc,v lrwxrwxrwx 1 bossman bossman 21 2007-12-20 19:08 bin -> .windows/installs/bin/ lrwxrwxrwx 1 bossman bossman 18 2007-12-20 19:00 Documents -> .windows/Documents/ -r-------- 1 bossman bossman 182 2007-12-21 15:05 .inputrc -r-------- 1 bossman bossman 525 2007-12-21 15:05 .inputrc,v -rw------- 1 bossman bossman 40 2007-12-21 14:47 .lesshst lrwxrwxrwx 1 bossman bossman 5.9K 2007-12-06 09:35 .nanorc -> .windows/.nanorc lrwxrwxrwx 1 bossman bossman 19 2007-12-20 16:37 .terminfo -> .windows/.terminfo/ lrwxrwxrwx 1 bossman bossman 12 2007-12-20 19:01 tmp -> .windows/tmp/
This gives me the ability to quickly move files back and forth between coLinux and Windows.
Hope this info is helpful to folks, :)
To the developers of coLinux. You's all seriously rock! coLinux is the greatest little gem in quite a long time, :)
MassTranslated on 25 Dec 2004.
ManuallyAdjusted on 25 Dec 2004. MassTranslated on Sun Apr 23 17:36:57 UTC 2006