It seems that a lot of folk have been reporting all sorts of problems with wireless in Hardy, especially where it used to work, and then it does not, and if you get it working it is dead again on reboot. I have had the same problem. My workaround, until the proper fix comes out is:
- Get it going.
- Immediately save the config file /etc/network/interfaces as /etc/network/interfaces-save
- add a line or two to /etc/rc.local to make it start up using the saved config.
1 & 2:
I think that the gui network config tools wreck the config file at present, as I have ended up with WPA1 and WPA2 stuff all mixed in. Other posts here help you figure out how to get a good config that works. Follow them. Once you can a wireless going, don't touch the gui network config tools again, but do immediately save /etc/network/interfaces.
As an example, here is my good config file. It is set for WPA1 using TKIP
If you cannot get wireless going, check that the config is not mixing WPA1 and WPA2 config items in your config file. You might have to edit the file and set a lot of the lines correctly yourself.
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
iface lo inet loopback
# The primary network interface
iface eth0 inet dhcp
iface wlan0 inet dhcp
- The key does seem to be correctly generated by the gui network config tools. You will obviously have your own key above.
- The above this is using native drivers with a Broadcom wireless chipset. The ndiswrapper package and Windoze drivers were no longer needed for me now.
Here is what I added to /etc/rc.local
# DT - 23/07/2008
# Fix to get the wireless up using a known good config file, because Hardy network config tools wreck them
if [ "`echo "$vW" |grep 'inet addr'`" ] ; then
[ -f /etc/network/interfaces-save ] && cp -a /etc/network/interfaces-save /etc/network/interfaces
/etc/init.d/networking restart >/tmp/rc.local-networking-restart
As you can see, all it does is check if wireless is up. If not, it overwrites /etc/network/interfaces with the good saved config, restarts all the networking, and reports it into /tmp, so you can see whether it needed to do the fix or not each time.
This should get you up and going on wireless each startup, even when some bugs are wrecking the networking config at some point earlier in the boot process. There seems to be no bug in the /etc/init.d/networking code or anything it calls, so this works fine ... at present at least. :-/