Thursday, November 08, 2007

Back to Debian

This Sunday I was completly fed up with Ubuntu on my Thinkpad. There were so many small annoyances and the last coffin nail came on Sunday when the Intel video driver from Xorg broke down. As I was running Debian on my desktop before I sold it, the new distro option was simple. Of course I knew that it would be quite the same but I was hoping that if I wouldn't install GNOME and all those i-do-it-for-you-automatically things, I can build a "loved system" again.
Installation could be smooth if I had looked to my second blog post about downloading the daily netinstall image. With stable netinstall image, installation stopped after not finding a suitable cdrom driver for cdrom it was running from :-D.
I've chosen OpenBox as my WM after recollecting why I fled away from Fluxbox in the past (it crash very unpredictably). And than problems came in. First, no sound problem, was solved by building latest 1.0.15 ALSA driver from sources. Second problem with wifi took me 3 days to investigate. I tried NetworkManager because I was happy with it in Ubuntu but somehow it didn't work. I tried setting wpa_supplicat but I found out later that system service /etc/init.d/wpasupplicant in Debian package was dropped. So I tried the Debian way and it didn't work either. I was getting the idea that something is terribly wrong. In addition to this, the debian ftp master broke down so I was not getting any "update of salvation".
Yesterday my googling bring me finally to real troublemaker: libssl0.9.8g-2. The new libssl break the wpa_supplicant which segfault right after creating connection to access point. So I downgraded to libssl0.9.8g-1 from lenny and voilà the wifi started working as expected.
Now I'm using Debian way of handling wpa connections and here are configs based on examples from this page and comment from Tomáš Pěnička - thank you guys!.
/etc/network/interfaces


# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
allow-hotplug eth0
iface eth0 inet dhcp

allow-hotplug eth1
iface eth1 inet manual
wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface home inet dhcp

iface default inet dhcp

/etc/wpa_supplicant/wpa_supplicant.conf

# path to UNIX socket control interface
ctrl_interface=/var/run/wpa_supplicant
ap_scan=1

### Example of basic WPA-PSK secured AP
network={
ssid="homeAP"
id_str="home"
proto=WPA
key_mgmt=WPA-PSK
psk=myHexKeyOf64Chars
priority=4
}

### Associate with any open access point
### Scans/ESSID changes can be done with wpa_cli
network={
key_mgmt=NONE
priority=2
}
What is good to mention is that you have to enclose ssid in commas, don't enclose hex key in commas and don't put ssid=ANY in default (open acces point) network block because wpa_supplicant will throw some syntax errors on you. An encoded key can be generated by wpa_passphrase utility.

/etc/default/ifplugd

INTERFACES="eth0"
HOTPLUG_INTERFACES="eth1"
ARGS="-q -f -u0 -d10 -w -I"
SUSPEND_ACTION="stop"
The ifplugd is used to monitor plugged cabel or whether the wifi is swithed on. ifplugd then bring up appropriate device.

That's it, I just chose wrong time to distro switch :-x

No comments: