I finally got WPA2 to work on my old Mac Mini G4, which is running Ubuntu Linux 10.04 server edition for PowerPC (Update: WLAN worked for a while, but it seems to be very unstable. Could be the location where it sits, or the software – Update2: running it at another location, it seems to work fine and stable).
I wanted to use the old Mini as a homeserver for a long time, but my girl-friend had complained about the (faint) noise it makes. Without a wireless connection, I had to place it next to the router, which in turn is placed next to her room.
Now with wireless I put it on the fridge in the kitchen, which is already quite noisy. Unfortunately, my girl-friend still complains. But I hope she’ll either get used to it, or I can still find a better place. With WLAN, there are more options.
Since I have installed Ubuntu Server and Samba for serving Windows shares months ago, I have forgotten the steps and can not talk about them now. I remember that the Ubuntu installation was really simple. Also I had apparently already configured the driver for the Mini’s wireless card, so I am not sure how I got that working. For a long time, I was unable to get wireless to actually work, especially not with WPA_SUPPLICANT providing access to my WPA2 encrypted network.
Hopefully information for installing the correct drivers for the Mac Mini wireless card can be found reasonably easy, as I can not retrace the steps anymore. My Mini required the b43 drivers, which requires download of the firmware by installing the b43-fwcutter package (sudo aptitude install b43-fwcutter).
So assuming your driver is working, I eventually found WPAHowTo for an old version of Ubuntu that describes most of the steps for configuring WPA2 (I only read the WPA_SUPPLICANT parts of that HowTo). All the newer how-tos seem to assume a graphical user interface and only describe how to use network-manager.
All instructions say to shut down eth0 before trying to start wlan0 (that’s how they are called on my system). So I grudgingly connected the Mini to a monitor and a keyboard again to complete the configuration. I also tested wlan without encryption, which worked.
Next install wpa_supplicant if not already done (sudo aptitude install wpasupplicant).
My wlan network uses a preshared key, so I used wpa_passphrase to generate the basis for a config file:
wpa_passphrase NetworkEssid passphrase
(replace NetworkEssid and passphrase according to your network’s setttings).
which resulted in output like
Then create or edit /etc/wpa_supplicant.conf (on my system the file did not exist yet). Since it needs the output of wpa_passphrase, I actually piped the output of wpa_passphrase into a file and copied it to /etc/wpa_supplicant.conf (somehow piping there directly didn’t work). (all operations in /etc require root privileges, so sudo accordingly). Also change owner and group of the conf file back to root in case by copying it or creating it it became owned by your “normal” user (chgrp root thefile and chown root thefile).
After some searching around, I found an example wpa_supplicant.conf for a WPA2 WLAN network using a preshared key and CCMP/AES encryption here They say they need a weird “double configuration” for it to work, but actually it also worked for me when I removed the TKIP stuff. So my final wpa_supplicant.conf file looks like this:
(Except of course other values for dummy and psk). It is probably save to delete the line with the clear text password, too.
Now the instructions from the WPAHowTo said to test wpa_supplicant like this (already with my parameters, not the ones from the HowTo):
sudo wpa_supplicant -iwlan0 -c/etc/wpa_supplicant.conf -Dwext
(Omitting the -w parameter from the HowTo, doesn’t seem to exist anymore)
The problem here was the -D parameter, as here you are supposed to state the correct driver (also, apparently, instead of wlan0 your wlan might have a different device name). At the Homepage of the linux driver for the b43 I found the information that “wext” should be used for wpa_supplicant.
So, again following the old HowTo, I put the following into my /etc/networks/interfaces:
iface lo inet loopback
iface eth0 inet dhcp
iface wlan0 inet dhcp
Now if I power up the server, it automatically connects to my WPA2-encrypted WLAN. I was very happy about this and put the server on the fridge. However, while I started writing up this summary, I experienced several connection losses. Now I feel like giving up on connecting the server via WLAN and try one of those Powerline networking things instead, which enable networking through the electric power lines (like this one).. On the other hand, I just moved the Mac Mini server into my room to connect it to the monitor again, and here WLAN seems to work fine. So maybe it was just the location on top of the fridge that doesn’t work – it is closer to the router, but at another angle and with different walls in between. I might try some other places for the server yet.
One candidate might be the bathroom, but I am bit worried about the occasional high humidity.
There are yet more issues to be solved before my home server is ready. Backups, what kind of file systems to share, iTunes server (?) or something else?
One small thing I also haven’t yet found a solution for yet: it would be nice if the Mini would shutdown if I press the power button. At the moment the power button simply seems to be ignored by the Ubuntu Server installtion. I could not yet find a solution for this – in the net there are some instructions for making the power button initiate the shutdown sequence, but they are all for normal PCs, not for PowerPC Minis. If anybody knows of a solution, please let me know!
That way, my girl-friend could also power the server on and off without having to learn about ssh and linux shells, and it wouldn’t have to run all the time.