every now and then i want the linux power on my windows. i tried all the workarounds: cygwin, unix-tools, vmware, virtual box, even the new microsoft powershell.

then i found colinux.

colinux actually runs a linux os as a windows program. i am not so strong on how it works, but i do use it and enjoy it, especially now when i develop on linux, and i don’t want to be remotely connected to another server all the time. i decided to share the setup i did for a colinux on my vista machine. here is the how-to, basically i followed the instructions at the colinux wiki:

  1. download colinux-stable from:
    http://sourceforge.net/projects/colinux/files
  2. download ubuntu distribution from the same address.
  3. install colinux c:\colinux, don’t download any distribution from the installer.
  4. unzip distribution files into c:\colinux.
  5. download 324Mb swap file from:
    http://gniarf.nerim.net/colinux/swap.
  6. unzip swap file into c:\colinux.
  7. edit c:\colinux\example.conf:
    cobd0="c:\colinux\Ubuntu-7.10.ext3.2gb.fs"
    cobd1="c:\colinux\swap_384Mb"
    root=/dev/cobd0
    ro
    initrd=initrd.gz
    mem=384
    eth0=slirp
    eth1=tuntap
  8. create and run batch file, with this content:
    colinux-daemon.exe -t nt @example.conf
  9. login using id: root, password: root.
  10. edit /etc/network/interfaces:
    auto eth0
    iface eth0
    inet staticaddress 10.0.2.15
    network 10.0.2.0
    broadcast 10.0.2.255
    netmask 255.255.255.0
    gateway 10.0.2.2
     
    auto eth1
    iface eth1
    inet staticaddress 192.168.37.20
    network 192.168.37.0
    netmask 255.255.255.0
    broadcast 192.168.37.255
     
    <li> edit tap adapter on windows: control panel\network and internet\network connections:
    <pre lang="text">properties, tcp/ipv4
    static ip: 192.168.37.10
    subnet mask: 255.255.255.0
    gateway: leave blank
  11. add new user, as root:
    useradd -d /home/user_name -g admin -m user_name 
    passwd user_name
  12. install ssh:
    sudo apt-get install ssh
  13. login using putty, connect to 192.168.37.20:22
  14. update system
    sudo apt-get update
    sudo apt-get upgrade
  15. change basic shell to bash:
    chsh -s /bin/bash user_name
  16. use samba to access linux machine from windows:
    sudo apt-get install samba
    sudo /etc/init.d/samba stop
  17. edit /etc/samba/smb.conf:
    [global]
    	workgroup = WORKGROUP
    [homes]
    	browseable=yes
    	writeable=yes
    	valid users = user_name
    	path = /home/user_name
  18. start samba again
    sudo /etc/init.d/samba start
  19.  add yourself as a samba user:
    sudo smbpasswd -L -a your_username
    sudo smbpasswd -L -e your_username
  20. on windows, right click on ‘my computer’ and choose ‘map network drive’, then enter: \\host_name\user_name, and fill your samaba password when asked to. if you haven’t changes the default host name then it is ‘ubuntu’
  21. that’s it :)