coLinux
Line 490: Line 490:
 
iface eth1 inet static
 
iface eth1 inet static
 
address 192.168.37.20
 
address 192.168.37.20
  +
netmask 255.255.255.0
 
network 192.168.37.0
 
network 192.168.37.0
 
broadcast: 192.168.37.255
 
broadcast: 192.168.37.255
  +
#gateway 192.168.37.10
 
</nowiki></pre>
 
</nowiki></pre>
 
To run an X client:
 
To run an X client:

Revision as of 05:23, 24 April 2007


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 xml config file:

<?xml version="1.0" encoding="UTF-8"?>
<colinux>
    <block_device index="0" path="\DosDevices\d:\coLinux\debian-3.0r0.ext3" enabled="true"/>
    <block_device index="1" path="\DosDevices\d:\coLinux\colinux-swap" enabled="true"/>
    <bootparams>root=/dev/cobd0</bootparams>
    <image path="vmlinux"/>
    <memory size="64"/>
    <network index="0" type="tap" name="TAP"/>
</colinux>

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 xml 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.
<?xml version="1.0" encoding="UTF-8"?>
<colinux>
<block_device index="0" path="\DosDevices\e:\coLinux\Debian-3.0r0.ext3.1gb" enabled="true"/>
<block_device index="1" path="\~DosDevices\e:\colinux\Debian-3.0r0_mod.ext3.1gb" enabled="true"/>
<block_device index="2" path="\DosDevices\e:\colinux\swapfile.image" enabled="true"/>
<memory size="82"/>
<bootparams>root=/dev/cobd0</bootparams>
<image path="vmlinux"/>
<network index="0" type="tap" name="TAP"/>
</colinux>

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:
<?xml version="1.0" encoding="UTF-8"?>
<colinux>
    <block_device index="0" path="\DosDevices\d:\coLinux\gentoo-i586-ext3-2g-deluxe" enabled="true"/>
    <block_device index="1" path="\DosDevices\d:\coLinux\swap_256M" enabled="true"/>
    <bootparams>root=/dev/cobd0</bootparams>
    <image path="vmlinux"/>
    <memory size="64"/>
    <network index="0" type="bridged" name="NDIS" mac="00:4A:41:52:45:4B"/>
</colinux>

Gentoo

I use this configuration file for gentoo.colinux.xml:

<?xml version="1.0" encoding="UTF-8"?>
<colinux>
  <!--
    #------------------------------------------------------------------------------#
    # This line must specify the swap file to use (256MB).                         #
    # Inside coLinux it will be /dev/cobd0.                                        #
    #------------------------------------------------------------------------------#
  !-->
  <block_device index="0" path="\DosDevices\C:\Projects\colinux\FileSystems\0.swap_fs-256MB" enabled="true"/>

  <!--
    #------------------------------------------------------------------------------#
    # These lines specify the several filesystems to use.                          #
    # Specified ~FileSystem Partitions will be:                                    #
    #   /boot - 64MB                                                               #
    #   /root - 1GB                                                                #
    #   /usr  - 2GB                                                                #
    #   /var  - 1GB                                                                #
    #------------------------------------------------------------------------------#
  !-->
  <block_device index="1" path="\DosDevices\C:\Projects\colinux\FileSystems\1.boot_fs-64MB.ext2"  enabled="true"/>
  <block_device index="2" path="\DosDevices\C:\Projects\colinux\FileSystems\2.root_fs-1GB.ext2"   enabled="true"/>
  <block_device index="3" path="\DosDevices\C:\Projects\colinux\FileSystems\3.usr_fs-2GB.ext2"    enabled="true"/>
  <block_device index="4" path="\DosDevices\C:\Projects\colinux\FileSystems\4.var_fs-1GB.ext2"    enabled="true"/>
  <block_device index="5" path="\DosDevices\C:\Projects\colinux\FileSystems\mandrake-10.0-rescue" enabled="true"/>

  <!--
    #------------------------------------------------------------------------------#
    # 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.    #
    #------------------------------------------------------------------------------#
  !-->
  <block_device index="6" path="\Device\Floppy0" enabled="true"/>
  <block_device index="7" path="\Device\CdRom0"  enabled="true"/>

  <!--
    #------------------------------------------------------------------------------#
    # This line specifies the Boot Parameters to pass to Kernel.                   #
    # After Gentoo is installed, the Root Parameter points to /dev/cobd2.          #
    #------------------------------------------------------------------------------#
  !-->
  <bootparams>root=/dev/cobd5</bootparams>
  <!--bootparams>root=/dev/cobd2</bootparams!-->

  <!--
    #------------------------------------------------------------------------------#
    # This line specifies the Kernel Image to boot.                                #
    # Other Kernel images can be set, but Windows must have access to them.        #
    #------------------------------------------------------------------------------#
  !-->
  <image path="vmlinux"/>

  <!--
    #------------------------------------------------------------------------------#
    # This line specifies the amount of memory available to coLinux.               #
    # Usually, set SWAP Partition to 2x the Memory Size available to coLinux.      #
    #------------------------------------------------------------------------------#
  !-->
  <memory size="64"/>

  <!--
    #------------------------------------------------------------------------------#
    # This line specifies the networking parameters.                               #
    #------------------------------------------------------------------------------#
    # The coLinux NIC is DHCP enabled, bridged with the Windows Host NIC.          #
    #------------------------------------------------------------------------------#
  !-->
  <network index="0" type="bridged" name="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.                        #
    #-----------------------------------------------------------------------------#
    #
  !-->
</colinux>

Transparent bridging example

Transparent bridging example. This essentially gives my colinux instance its own nic.


<?xml version="1.0" encoding="UTF-8"?>
<colinux>
<block_device index="0" path="\DosDevices\C:\Program Files\coLinux\Debian-3.0r0.ext3.1gb" enabled="true"/>
<block_device index="1" path="\DosDevices\c:\Program Files\colinux\swap_device" enabled="false"/>

<bootparams>root=/dev/cobd0</bootparams>
<image path="vmlinux"/>
<memory size="64"/>

<!-- specify the name and mac of the physical interface that we want to bridge onto -->
<network
index="0"
type="bridged"
name="Intel 8255x-based PCI Ethernet Adapter (10/100)"
mac="00:50:8D:48:BF:3A"/>
</colinux>

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.default.xml

<?xml version="1.0" encoding="UTF-8"?>
<colinux>
    <!-- My Windows OS and Program Files is on F:\ -->
    <block_device index="0" path="\DosDevices\f:\Program Files\coLinux\Debian-20040605-mit.ext3.1610mb"
    enabled="true" />

    <block_device index="1" path="\DosDevices\f:\Program Files\coLinux\swap_device"  enabled="true" />
    <bootparams>root=/dev/cobd0</bootparams>
    <image path="vmlinux" />
    <memory size="64" />

    <!-- The magic of bridging -->
    <network index="0" name="Marvell" type="bridged" mac="00:43:4F:4E:45:31"/>
</colinux>

File startup.bat (one click startup of my Linux daemon):

colinux-daemon -c colinux.default.xml -t nt -d

See also: http://colinux.wikia.com/wiki/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:
http://www.henrynestler.com/colinux/source/0.8.0-doc/cofs.txt
http://wiki.colinux.org/wiki/CofsDevice


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!
<?xml version="1.0" encoding="UTF-8"?>
<colinux>
    <!-- This line needs to point to your root file system.
   For example change "root_fs" to the name of the Debian image.
         Inside coLinux it will be /dev/cobd0

 Block Device Aliasing: You can now handle most dual-boot issues
 by adding an alias="devname" to block_device. i.e. alias="hda",
 alias="hda1" You can do this for SCSI as well as IDE.  You need
 to be aware that if you add an alias, you need to change your
 bootparams root="devname" appropriately (you may need to use
 devfs naming in some situations).  -->
    <block_device index="0" path="\DosDevices\E:\Program Files\coLinux\Debian-3.0r2.ext3-mit-backports.1gb"
    enabled="true" />


    <!-- This line can specify a swap file if you wish, or an additional
         image file, it will /dev/cobd1. Additional block_devices can
 be specified in the same manner by increasing the index -->

    <!-- <block_device index="1" path="\DosDevices\E:\Program Files\coLinux\swap_device"
    enabled="true" /> -->

    <!-- bootparams allows you to pass kernel boot parameters -->
    <bootparams>root=/dev/cobd0</bootparams>

    <!-- Initial RamDISK (initrd) support -->
    <initrd path="initrd.gz" />

    <!-- image allows you to specify the kernel to boot -->
    <image path="vmlinux" />

    <!-- this line allows you to specify the amount of memory available
         to coLinux -->
    <memory size="64" />

    <!-- This allows you to modify networking parameters, see the README
         or website or wiki for more information -->
    <network index="0" type="tap" />
</colinux>

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 xml file:

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

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



MassTranslated on 25 Dec 2004.

ManuallyAdjusted on 25 Dec 2004.


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