Mike Gerwitz web developer and administrator of GNU/Linux systems, focusing on the development of online communities (e.g. MyCustomBB). Mike is also a freelance web developer and can be found on RentACoder, and is a strong supporter of free software.

Mike Gerwitz’s Weblog

Through the Eyes of a Web & Software Developer

Archive for August, 2008

2.6.27 kernel note: Everything works properly in 2.6.27 if you compile the kernel with support for rt61 (or your driver). Run make menuconfig in your kernel source directory (usually /usr/src/linux) and locate the RaLink driver you need in Device Drivers -> Network Device Support -> Wireless Lan. It is located at the bottom. If you compile it as a module, remember to modprobe.

Crash note: Pre-2.6.27 (I was using 2.6.26), my PC would simply restart and complain about a Hyper Transport sync flood error once it rebooted (BIOS message). This would happen when the driver was loaded and the card was in use. I have not yet had this problem with the 2.6.27 kernel.

I recently purchased a Linksys wireless PCI card for my home computer and ran into a few problems with the driver installation under Gentoo using a 2.6.26 kernel. A simple “emerge rt61″ command would not work - the sources would not compile. I tried a number of things, including compiling support with the kernel (as included in 2.6.24 and up), but that still did not work.

Yes, this will require some compiling - but don’t be afraid of it. The process is quite simple.

First, to find out if we’re talking about the same type of card here, type lspci as root. Below is my output:

01:07.0 Network controller: RaLink RT2561/RT61 802.11g PCI

RaLink provides open source drivers for this card on their website, however, as I stated above, they do not seem to compile with 2.6.26 kernels. I finally came across the following wiki page:

http://gentoo-wiki.com/HARDWARE_rt2×00

The “Open Source…” section contains the information I used to get my card working. Be sure to read it in addition to this entry, as it provides you with additional information such as necessary kernel configuration options. The wiki page then instructs you to download the open source drivers that pertain to your card from the following website:

http://rt2×00.serialmonkey.com/wiki/index.php?title=Main_Page

In my case, the drivers I needed were “rt61″. Select the drivers that pertain to your system as stated by lspci. Download it, extract it, compile, and install (as root). Be sure to replace the wget URL below with the URL to the CVS tarball you require:


$ wget http://rt2x00.serialmonkey.com/rt61-cvs-daily.tar.gz
$ tar -xzvf *.tar.gz
$ cd rt*/Module
$ make
$ make install

That should be it! Again, as root, attempt to load the kernel module. Again, this will differ based off of the driver you installed:

$ modprobe rt61pci

At this point, the wiki does not go any further. So, if you don’t know how to manually configure wireless network settings, you’re kinda screwed. First, let’s make sure your wireless card is properly recognized:


$ iwconfig
$ iwlist wlan0 scan

When running the first command, you should see additional information next to “wlan0″ or a similar device. When running the second, you should see a list of all available networks within range. If you do NOT, then you may not have set it up correctly. Refer to the wiki and driver documentation for more information.

The problem only is, it is not yet set up. So, let’s get to that. In the Module directory of the tarball you extracted (if you haven’t closed the terminal you ran the make command in, you’re in the correct directory) there is a README file. Direct your attention to the “Configuration” section.

Wireless Configuration - GUI

It provides two options - a GUI or manual configuration. Let’s start with the GUI:

http://rt2×00.serialmonkey.com/wiki/index.php/Downloads

Download the graphical configuration tool. After you extract it, you will have to compile it:


$ ./configure.sh
$ make && make install

You may then run the command rutilt. If it does not recognize the command as root, try running it as a normal user. When needed, it will prompt you for your root password. Use the “Site Survey” tab and click “Scan” to list the available networks. Then, simply select one, enter the necessary information (such as the key, if you have one) and you should be on your way!

Wireless Configuration - Manual & Start on Boot

I noticed that when I upgraded my kernel to 2.6.27 and used the built-in driver rather than the one discussed above, the GUI tool no longer worked. I wanted to abandon it anyway - I didn’t want to set up my configuration every time I started my computer. I wanted it to start up automatically.

I referenced the following link from the Gentoo documentation:

http://www.gentoo.org/doc/en/handbook/handbook-x86.xml?part=4&chap=4

Take a look over it and decide what method you would like to use. I decided to go with wireless-tools. In the example below, I am using DHCP to keep things simple. If DHCP works for you, then you can get into manually configuring your IP address. Again, refer to the documentation for more information, as this is just an example and provides little explanation.

In the example below, the ESSID I’m attempting to connect to is “Gerwitz Wireless Network” which uses an open WEP ASCII key. I replaced my actual key below with “XXXXX”.


$ emerge -av wireless-tools
$ vi /etc/conf.d/net

—–

/etc/conf.d/net:

modules=( "iwconfig" );

key_Gerwitz_Wireless_Network=”[1] s:XXXXX key [1] enc open”

preferred_aps=( “Gerwitz_Wireless_Network” )

config_Gerwitz_Wireless_Network=( “dhcp” )
fallback_Gerwitz_Wireless_Network=(” 192.168.1.10/24″ )
fallback_route_Gerwitz_Wireless_Network=( “default via 192.168.1.1″ )

—–


$ /etc/init.d/wlan0 restart
* Caching service dependencies ... [ ok ]
* Bringing down interface wlan0
* Bringing up interface wlan0
* Configuring wireless network for wlan0
* Scanning for access points
* Found "Gerwitz Wireless Network" at 00:15:E9:76:1A:EE, managed, encrypted
* Connecting to "Gerwitz Wireless Network" in managed mode (WEP enabled - open) ... [ ok ]
* wlan0 connected to SSID "Gerwitz Wireless Network" at 00:15:E9:76:1A:EE
* in managed mode (WEP enabled - open)
* dhcp ...
* Running dhcpcd ...
wlan0: dhcpcd 4.0.1 starting
wlan0: broadcasting for a lease
wlan0: offered 192.168.1.103 from 192.168.1.1
wlan0: checking 192.168.1.103 is available on attached networks
wlan0: acknowledged 192.168.1.103 from 192.168.1.1
wlan0: leased 192.168.1.103 for 10800 seconds [ ok ]
* received address 192.168.1.103/24 [ ok ]

Remember to replace “wlan0″ with your interface. It should now start up on boot.

Granted, this guide does not cover everything - it is simply to help you to get your card working.

  • 1 Comment
  • Filed under: GNU/Linux, Guides
  • Success of Free Software

    Free/open source software has had a profound impact on the modern age of computing. It continues to grow with each day and has become a major competitor to even large software companies such as Microsoft. At this rate, free software will continue to develop to the point where it may very well be an entirely viable alternative to proprietary software (including operating system). However, what’s taking it so long?

    The way I see it is - funding. The majority of free software projects are funded through donations. Yes, that’s a great way to fund a project and build up a community, however it also limits the amount of time you can spend on the project. Many open source / free software projects are done in the developers’ free time - they’re not really getting paid for their work. So development may be slow. Take for example my MyCustomBB project - under development for nearly two years but barely on track and already becoming outdated. I haven’t had enough free time. What can be done to address that?

    “A report by Standish Group says that adoption of open source has caused a drop in revenue to the proprietary software industry by about $60 billion per year.” ~Wikipedia

    (more…)

  • 0 Comments
  • Filed under: Free Software
  • Gentoo: Banshee with iPod flag; podsleuth

    I’m sure it’s painfully aware how much I hate iPods by the amount of content on this page supporting the elimination of DRM. This post just goes to support that.

    A friend of mine is having a problem with their iPod. The iTunes library decided to be an ass and get rid of most of their music. So they’re afraid of loosing what’s already on the iPod. So I’m installing Banshee for GNU/Linux as I know that it is able to easily download the songs off of an iPod. That way I can back up her music for her.

    Great - but a slight problem. Podsleuth 0.6.1 fails to compile. It complains about not being able to find  gutils. So, for those of you having this problem, after much searching, I found this bug report:

     http://bugs.gentoo.org/show_bug.cgi?id=233960

    There exists an attachment to provide an ebuild for podsleuth 0.6.2 and a patch. Download it:

     http://bugs.gentoo.org/attachment.cgi?id=162367

    Extract the contents into /usr/local/portage/dev-dotnet. You may need to create the directory. So, it should look like: /usr/local/portage/dev-dotnet/banshee. Placing it in here ensures it won’t be overwritten during an emerge –sync.

    Now, if you don’t have a local repository set up, enter the following command to add it to your make.conf:

    echo ‘PORTDIR_OVERLAY=”/usr/local/portage”‘ >> /etc/make.conf

    Now, try to emerge banshee again and it should use podsleuth-0.6.2. All should be well.

    Oh. And it’d better not be your iPod you need this for. Get rid of it, or install rockbox.

    But, in the end, it didn’t work out. I had to end up using GTKpod to copy the files, because podsleuth was having trouble recognizing the iPod. So this post was just to provide information for those with similar problems and demonstrate how to solve them with the use of ebuilds and overlays.

  • 0 Comments
  • Filed under: GNU/Linux
  • Installing Gentoo Via Ubuntu & PAM Problems

    Well, it’s that time again. Gentoo is great - you have an incredible amount of control over the distribution. However, that can also be a bad thing. I screwed a few things up, and it got to the point where it’d be faster to spend the two days reinstalling and reconfiguring Gentoo than it would be to fix everything.

    Then I screw up again by accidently unpacking the stage3 tarball into the root directory instead of a subdirectory (to use for 32-bit chroot) and that completely ahnilated a number of things (as it replaced a number of necessary files - it didn’t even recognize me as a user anymore! “i have no name!”). So, that’s what I’m up to now. Reinstalling it.

    But yet another problem - this time, PAM went crazy. At first, I noticed that I could not log into the box via SSH. I forgot exactly what it said - access denied, permission denied, something along those lines. So I reboot the system hoping it’d somehow fix it (since restarting SSHD did nothing). But - even bigger problem. I could not log in! It prompted me for my username, but as soon as I entered it, said that authentication failed. It never asked me for my password. Not even for root. So I obviously had a delema.

    This is where Ubuntu comes in. It is excellent for installing Gentoo. I prefer the bootable CD to Gentoo due to ease of use - I can simply get right into it. Not only that, but I can easily browse the web or even play games (included on CD, from my other HDDs, or quickly download from the repositories). I then chroot into my gentoo environment and there I can re-emerge anything I need to - something I can’t do normally because, well, I can’t log in. I considered simply deleting /etc/pam.d, but I wasn’t sure if that’d create even more problems. (I wanted it to fail to load so it’d let me in.)

    Anyway - for those of you also having PAM problems, try the following (ensure you’ve already emerged gentoolkit). Run “equery depends pam” and re-emerge all packages listed. You may want to use the –nodeps option if you have a long list. If you are unable to log in, re-emerge shadow. That should solve that problem. SSH problems? Re-emeber openssh.

    Don’t forget to run etc-update!

    Edit: Alright - I give up on PAM. Too much trouble. Never liked it. Do yourself a favor: http://gentoo-wiki.com/HOWTO_Remove_PAM

    Don’t forget to remove the pam use flags: “euse -D pam”

    It’s odd that I had this problem only this time around. Hopefully it finishes soon so I can start GNOME compiling before I head off to bed. It’s 6:00 in the morning; I’m tired.

    Oh - and for those who are wondering. Despite the incredible amount of time I have spent installing and configuring gentoo (with all the use flags I use, it needs constant attention as packages fail to compile all the time), it is definatly worth it. I love Ubuntu to death, and it is my first choice all other times, but I can not sacrifice the incredible amount of control and speed improvements Gentoo provides. Because I compile everything for my system and choose only the features I want, it is a god compared to Ubuntu in regards to performance. So, keep that in mind when you consider switching.

  • 0 Comments
  • Filed under: GNU/Linux