June 21, 2004

Handy wireless networking with Knoppix Linux

Last year I bought an IBM T30 Thinkpad, intending to install Linux on its hard drive sometime. Meanwhile, using a Knoppix LiveCD let me run Linux on the laptop while retaining the factory Windows XP installation. The notebook is my travel machine, so I also bought a Linksys WPC55AG PC Card wireless network adapter that supports 801.11a/b/g for the Thinkpad. For secure wireless Linux surfing, I was determined to find some configuration that would work with minimal intervention at boot time and that was easy enough that my wife could load it.

Few LiveCD distros come configured with support for the Linksys WPC55AG adapter, which requires the MadWiFi modules with a correctly configured kernel. Mepis Linux, Kanotix, a modified Knoppix, and the latest Knoppix v3.4 can configure this card.

I succeeded in configuring the Linksys adapter with both Kanotix Bug Hunter 05-2004 and Knoppix v3.4 with the default 2.4x kernel. The latest Mepis Linux version locks the machine up upon configuring the card. I prefer the simple startup of the original Knoppix.

To implement wireless networking at home, I began by booting Knoppix normally. The Linksys wireless card was detected and ready to configure. I created a root password by going to the Knoppix menu, selecting Root shell, typing su to become root, then typing passwd to create a root password.

Next, I ran picked the Knoppix Network/Internet/Wavelan configuration menu choice. For ath0, the device designation of my adapter, I entered an ESSID, mode (managed), channel number, and the hex encryption key I wanted to use.

As root, I edited /etc/resolv.conf to include the IP address of my Netgear router as nameserver:

        # Insert nameservers here
        # nameserver

        search my.cablecompany.net

Still as root, I edited /etc/network/interfaces to configure a static IP for the wireless network adapter. It was easier to configure ath0 as static than to deal with DHCP. Strangely, the transmit power had to be specified, which is 17dbm or 50mW for this card:

        #/etc/network/interfaces -- configuration file for ifup(8), ifdown(8)

        # The loopback interface
        # automatically added when upgrading
        auto lo
        iface lo inet loopback
        iface ath0 inet static
        wireless_essid youressidname
        wireless_mode managed
        wireless_key xxxxxxxxxx
        wireless_channel 9
        wireless_txpower 50mW

When I finished configuring my desktop, colors, and wallpaper, I saved the Knoppix configuration on a 32MB FAT-formatted Compact Flash (CF) card I added to the machine via a PC Card adapter. You can also use the hard drive to save configuration data. To do either, go to the Knoppix menu, select Configure, then Save the Knoppix configuration. Check all the selections to save everything, then select which hard drive or removable media to save to.

To use the saved configuration, enter a cheat code at the startup prompt: Knoppix myconfig=/mnt/hdxx, where the device specified is the one you chose to save to. Once the operating system is loaded, go to the terminal program, type su to become root, then type ifup ath0 to activate the wireless adapter. You can type route in the terminal window as root to verify the kernel routings if there are problems with your edits.

After I activated my adapter I saw that both LEDs of the Linksys card were blinking. The Knoppix - Internet - More Programs - WaveMon program verified that the connection was working. The default Knoppix Samba config allows one to access Windows shared computers. Now I can surf wirelessly and copy or write files to other computers (with shared areas) on my home network using Samba and print to a shared printer on a Windows computer.

This technique worked for my IBM T30 Thinkpad without built-in wireless hardware, and my Linksys WPC55AG card. Other notebooks may behave differently and may require different settings, but the basic techniques should still apply. You can feel secure that Windows viruses and exploits will not have much of a chance of compromising your installation when you go wireless with Linux.


  • Networking
Click Here!