in BSD, Linux, Wireless

giving up on SUSE Linux 10

I finally gave up on SUSE Linux 10 on my ThinkPad T42 from work.

There were a number of reasons for doing so, but in general I just found that everything was far too complicated and had too many GUI layers and layers of abstraction upon layers of abstraction, such that I couldn’t actually do anything on the box without fear of breaking it.

A perfect example was trying to get dual-monitor support working. In order to configure Xorg under SUSE 10, you’re not supposed to manually hack the /etc/X11/xorg.conf file any more; there’s a warning in the file admonishing you to not do such a thing. You’re supposed to use this utility called SaX2, which I guess is invoked from YaST (see what I mean about too many layers of abstraction?) to configure it. But what happens when SaX2 doesn’t work? For example, it kept detecting my external monitor as the primary video display, no matter what I told it. And it didn’t seem to like the fact that I wanted to operate the external monitor at 1280 x 1024, and the laptop LCD as 1024×768 (since that’s as high as it can go).

Eventually I did ignore SUSE’s warnings and I hacked together an xorg.conf myself, only many X11 extensions, such as SHAPE and DGA were missing, even if I listed them in the Options clause of the configuration file. Nothing I seemed to do would put this back.

I also missed the ability to easily install new software. Even with Fedora Core, you are able to use yum to easily install packages off the Internet. But with SUSE, you need to run YaST, which is, at best, a curses-based tool. And I couldn’t figure out how to get it to stop asking me for the installation DVD.

The straw that broke the camel’s back was the inability to use my wireless card in two different places without hacking various config files in /etc/sysconfig. I have both a WPA network at work and at home, which means that I should be able to leave wpa_supplicant running all the time, right? Wrong! You can’t do that under SUSE 10. The running wpa_supplicant.conf is actually hacked together using a very large shell script in /etc and saved to /var/run. And your PSK, etc. are hardcoded in the /etc/sysconfig/network-scripts/ifcfg-wlan0 file. Doesn’t this defeat the whole purpose of the supplicant?

I noticed indirectly that this is on the Feature Wishlist for SUSE 10.1 (or later). But I need this functionality now. I am not going to come home from work and:

  1. hack my /etc/sysconfig/network-scripts/ifcfg-wlan0 with my home PSK and BSSID;
  2. /sbin/ifup the wlan0 interface;
  3. kick dhcpcd to tell it to ask for a lease on the newly-created wlan0 interface

just so I can get on the LAN!

So I decided to just install FreeBSD 6.0-RELEASE. This didn’t go as smoothly as I’d hoped. First of all, I panicked the box during a make world by inserting and removing a PCMCIA (sorry, PC Card… I’m old-fashioned!) USB card. Then when I rebooted the box, the background fsck(8) ran, but didn’t find certain inconsistencies in time, so when I tried to build world again, it panicked again on a ufs_dirbad in the non-checked portion of the disk. I almost had to rebuild the box from scratch but I figured that I could just foreground fsck(8) /usr and if that worked, I could go ahead and build a new world.

After I did so, and installed it, the box was fine. And how easy is it to configure wireless networking even with WPA under FreeBSD? It’s a cinch — and it’s designed properly, so no farting around with config files and then having SuSEconfig or some other overly-bloated tool go and convert them into another format. Here’s how I set up persistent WPA:

  1. Install Intel firmware for my iwi(4) adapter, from the ports tree. This is because the driver comes with FreeBSD, but the firmware must be downloaded separately. Then enable iwi(4) to be loaded on boot in /boot/loader.conf:


  2. Enable firmware loading on boot in /etc/rc.conf:


  3. Edit /etc/wpa_supplicant.conf and put all parameters for all networks in there, like you’re supposed to
  4. Tell the netstart scripts that I want to configure iwi0 with WPA by creating the following line in /etc/rc.conf:

    ifconfig_iwi0="WPA DHCP"

  5. Bring the interface up:

    $ sudo /etc/rc.d/netif start

And that was it:

[email protected]$ /sbin/ifconfig iwi0
iwi0: flags=8843 mtu 1500
        inet6 fe80::20e:35ff:fefc:3923%iwi0 prefixlen 64 scopeid 0x2
        inet netmask 0xffffff00 broadcast
        ether 00:0e:35:fc:39:23
        media: IEEE 802.11 Wireless Ethernet autoselect (OFDM/48Mbps)
        status: associated
        ssid aquezada channel 9 bssid 00:14:bf:0b:5f:ca
        authmode WPA privacy ON deftxkey UNDEF TKIP 2:128-bit TKIP 3:128-bit
        txpowmax 100 protmode CTS roaming MANUAL bintval 100

By the way, the FreeBSD Handbook is a bit out of date with respect to the new wireless technologies in FreeBSD 6.x. There’s a draft of a revised section available here for anyone wanting to try this out!