LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement

Listen Print Discuss Subscribe to Linux Subscribe to Newsletters

coLinux: Linux for Windows Without Rebooting
Pages: 1, 2

coLinux Networking

coLinux networking is as gentle as its console. coLinux uses the Tap32 driver to connect to the network as if it were a completely different computer.



There are mainly two different ways to connect this virtual computer to the network. One is through Network Address Translation (NAT). The other is by setting up a Native/Bridged network. For the sake of simplicity we will use the first method.

First, install the TAP-Win32 driver as explained above. Then, configure Connection Sharing on the Windows box.

For Windows 2000, navigate through Control Panel -> Network and Dialup Connections -> Select the network adapter for sharing -> Properties -> Sharing Tab -> Enable Internet connection sharing -> use the name of the TAP-Win32 adapter - > Ok.

With Windows XP, instead follow Control Panel -> Network Connections -> Select the network adapter for sharing -> Properties -> Advanced Tab -> Allow other network users -> Use TAP-Win32 Adapter -> Ok.

Your coLinux session needs an IP address on the same network as the network interface that serves as your gateway. If you have installed Debian rootfs, then check the values in the file /etc/network/interfaces. (You can use nano or vi as your editor with this image. Be warned that the console updates slowly sometimes, so you may see things that really aren't there.)

Here's the default configuration. They're also compatible with the default Windows Connection sharing settings which make the IP of your TAP-Win32 Adapter 192.168.0.1:

ifconfig eth0 inet static
address 192.168.0.40
gateway 192.168.0.1
netmask 255.255.255.0

Now change the /etc/resolv.conf file. This stores the addresses of your DNS servers. Put in the correct values for your network.

Finally, restart your Ethernet interface to activate the changes:

# ifdown eth0
# ifup eth0

If you prefer to make your changes the quick and dirty way, the following commands also work:

# ifconfig eth0 192.168.0.40 netmask 255.255.255.0
# route add default gw 192.168.0.1
# echo "nameserver [nameserver_ip] > /etc/resolv.conf

Let's now test the connection. ping is always a good place to start.

colinux:~# ping www.sun.com
PING www.sun.com (64.124.140.199) 56 data bytes

---www.sun.com ping statistics ---

Depending on the configuration of your LAN and firewall, you may not receive an answer to this ping request. The name resolution of www.sun.com to 64.124.140.199 means that you've reached DNS, so you've reached the Internet. You'll probably reach the Web and other services correctly.

What's Installed?

With a nice, networked Debian GNU/Linux box on top of a Windows computer, it's time to experiment. First let's see what we have installed. Debian's dpkg tool comes in handy:

$ dpkg --get-selections | more

Here are the basic installed programs in several categories.

  • Editors. nano and nvi will have to suffice for most of users. (Sorry, Church of Emacs!) If you are not into the arcane knowledge of vi, try nano.

  • Programming. As for the basics, you can use bash and perl scripts.

  • Pager. Well, there's more, but unfortunately no less.

  • Networking. Your options are limited. There's ping, but unfortunately no traceroute or mtr. There's also iptables, for basic needs.

There are very few programs included, which is why it's a base system that takes up only 93Mb on disk. Don't forget that you are using Debian GNU/Linux, one of the most easily updateable systems.

Adding and Upgrading Programs

The base system configuration makes it easy to add the programs you want. First, update the list of installable packages:

# apt-get update

Then, you can install any package by name with the command:

# apt-get install package_name

Of course, if you're not familiar with the Debian packaging system (of world domination), you may not know which packages you want. Never fear! You can search for packages with:

# apt-cache search search phrase

You can also read package descriptions with:

# apt-cache show package_name

For more information, see Davor Ocelic's excellent Debian Tutorial.

Now that you have a base GNU/Linux box that you can upgrade or on which you can install new software, you can experiment with anything you like.

Conclusion

The coLinux project is a still in the beta stage, though it can already boot Knoppix and do more complicated tasks. There still are glitches on the console; the screen does not update well in full screen mode, there's no command line history editing, and I could not find a way to scroll back in the console window, for example.

Possible uses include using it for networking, both experimental and for production. You can set up a coLinux network and try IDS software on it. You can extend your Windows box with GNU/Linux abilities (like Cygwin), or experiment with different Linux kernels, though UML may be a better option.

All in all, this is a very interesting concept. I predict that it will be a very good alternative to other Linux virtualization solutions in the very near future.

References

  • coLinux

  • coLinux Wiki. This is probably your main source of coLinux info. It was my best reference while setting up coLinux.

  • Rute User's Tutorial and Exposition, an all-round GNU/Linux book even suitable for beginners.

  • Davor Ocelic's Hands-on Guide to the Debian GNU Operating System. If you are familiar with GNU/Linux but not Debian, this Guide will teach you lots.

  • A very good in-depth Debian Reference Guide.

KIVILCIM Hindistan works as a full time computer security consultant with a CISSP, using Linux and Free Software as weapons of choice.


Return to LinuxDevCenter.com.


coLinux or Cygwin? coLinux or VMware? coLinux or Knoppix? What have you chosen and why?
You must be logged in to the O'Reilly Network to post a talkback.
Post Comment
Full Threads Oldest First

Showing messages 1 through 6 of 6.

  • HELP!!!
    2007-03-12 16:16:05  ~eric~ [Reply | View]

    I installed the colinux exe and the file it said to install with it. I also then added the hardware that the webpage said to add to make it work but for some reason when I double click colinux-daemon a window pops up and then it looks to like close right after. I dont have time to even think about looking at what it could say.
    Anyone might know my problem. I couldnt find the gnu/linux thing it said to download that could be the problem but where do I download it and where do I download/unpack it to.
  • Co Linux is CO-OPTION
    2004-05-04 11:03:50  jbailo [Reply | View]

    This sounds like a m$ plot to try and thwart the interest in Linux.

    It's a stupid idea -- the benefits of Linux come from running pure Linux. WINE can take care of Windos applications. But ultimately, we need to replace everything that has to do with Windos -- not carry the baggage along into the 21st century -- the Linux Century....
    • Co Linux is CO-OPTION
      2006-09-08 05:52:30  onederer [Reply | View]

      I'm using an HP-64 zv6000 laptop. It is the most [b]Linux resistant laptop[/b] that I've ever seen. I believe that this machine was designed by HP engineers who hate Linux! I only found one distro (Freespire) that can do wireless networking, using the Broadcom built-in wlan0 card. The hard drive's available space is limited, so I'm not crazy about creating any partition to install Linux. I think free coLinux would be my salvation for everyone of those problems.

      Cheers!
    • Co Linux is CO-OPTION
      2005-12-01 15:30:57  vestel [Reply | View]

      selam
    • Co Linux is CO-OPTION
      2004-05-04 12:57:19  yokem55 [Reply | View]

      While that may be an ideal, the reality is that A LOT of people are stuck on Windows for reasons that are beyond their control. Cooperative linux for them is a godsend since it provides a full linux environment to work with in the meantime.
  • Bochs is an emulator
    2004-05-01 10:57:16  oak [Reply | View]

    Bochs emulates the x86, instead of just virtualizing it. Emulation is portable, virtualization needs to be run on the same CPU as what it virtualizes. But it's significantly faster than emulation...


Tagged Articles

Post to del.icio.us

This article has been tagged:

linux

Articles that share the tag linux:

Managing Disk Space with LVM (74 tags)

Use Your Digital Camera with Linux (60 tags)

mdadm: A New Tool For Linux Software RAID Management (59 tags)

Asterisk: A Bare-Bones VoIP Example (43 tags)

View All

colinux

Articles that share the tag colinux:

coLinux: Linux for Windows Without Rebooting (3 tags)

View All

software

Articles that share the tag software:

What Is Web 2.0 (185 tags)

Rolling with Ruby on Rails (97 tags)

How Does Open Source Software Stack Up on the Mac? (79 tags)

Calculating the True Price of Software (68 tags)

Delve into DEVONthink (30 tags)

View All

Sponsored Resources

  • Inside Lightroom
Advertisement

Sponsored by:

O'Reilly Media

©2009, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Academic Solutions
Authors
Contacts
Customer Service
Jobs
Newsletters
O'Reilly Labs
Press Room
Privacy Policy
RSS Feeds
Terms of Service
User Groups
Writing for O'Reilly
Content Archive
Business Technology
Computer Technology
Google
Microsoft
Mobile
Network
Operating System
Digital Photography
Programming
Software
Web
Web Design
More O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com

Partner Sites
InsideRIA
java.net
O'Reilly Insights on Forbes.com