Building on my previous post, this is how to enable wireless networking on boot without NetworkManager.
I’m using WPA in this example, but the setup is similar for WEP and WPA2 using wpa_supplicant.
Remove NetworkManager (Optional)
sudo apt-get remove network-manager
Setup WPA Supplicant
To convert the WPA passphrase into the appropriate form (which is salted with the SSID), you need to use wpa_passphrase. For example:
wpa_passphrase my_ssid my_secret_password
Using this information, you need to setup /etc/wpa_supplicant.conf like so:
Enable Wireless Interface
Put an entry in /etc/network/interfaces for wlan0 (or wlan1, or whatever your wireless interface is).
NOTE: I’ve put the DHCP option here for completeness, but I ran into problems with a Belkin USB F5D9050 wireless adapter not getting an IP successfully, even after it associated with the AP. I’m not sure if this was a problem with the device, the linux driver, or the AP. I ended up adding a DHCP reservation on the AP and then using a static IP configuration on the server.
Option 1: DHCP
iface wlan0 inet dhcp
Option 2: Static IP
iface wlan0 inet static
If you are having issues getting this to work, one debugging trick is to start up wpa_supplicant directly in the foreground and checking the output of dmesg and /var/log/syslog for additional details.
sudo wpa_supplicant -Dwext -iwlan0 -c/etc/wpa_supplicant.conf -dd