Sunday, June 1, 2008

Connect to a WPA-PSK wireless network on Slax

My environment: IBM Thinkpad T60 Centrino + SLAX 6.0.7 on my USB flash disk

Slax is a very lightweight and portable linux OS and I have just tried it on my USB flash disk, it is so easy to use that I can build it from stretch and connect to my home wifi within half an hour. Here is a short tutorial in how to connect it to my WPA-PSK protected wireless network.

1. Get your Slax here:
http://www.slax.org/get_slax.php

You can either burn it on your CD or download and extract the tarball to your USB flash disk. Run the bootinst.bat or bootinst.sh to make it bootable.

2. Download wpa_supplicant from http://www.slax.org/modules.php?action=detail&id=533. Move this module into /mnt/sdb1/modules, where sdb1 is the USB flash disk in my case.

3. Create the wpa_supplicant.conf config file in /mnt/sdb1/rootcopy/etc. Here is an example:

ctrl_interface=/var/run/wpa_supplicant
ctrl_interface_group=0
eapol_version=1
#ap_scan=0
#fast_reauth=1

network={
ssid="pandassid"
key_mgmt=WPA-PSK
proto=WPA
pairwise=TKIP
group=TKIP
psk="ilovethisblog"
}

4. Reboot it and then run this in your terminal:
wpa_supplicant -d -iwlan0 -c/etc/wpa_supplicant.conf -Dwext

5. You should receive confirmation on the terminal saying your key is accepted. Open another terminal and run the following:

iwconfig wlan0 essid pandassid
dhcpcd -G 192.168.1.0 wlan0

6. Done!!

3 comments:

Anonymous said...

I suggest you tell the people how to automate this to happen at boot time.

Anonymous said...

Great, great post! Thanks a lot!

Anonymous said...

worked for me, thank you so much.