One of the reasons I wanted to start writing something down about my experiences with tech is the Linksys NSLU2, otherwise known as the Slug.
It's about the size of a deck of cards, draws 10w of power from the wall, and has two USB 2.0 ports and one 10/100bT networking jack. As shipped, it shares drives connected to those USB ports as if it were a Windows machine. This isn't bad, but feels a bit thin for the $85 it costs.
Enter the good folks at NSLU2-linux.org. As it turns out, this is a 266 MHz ARM processor with 32 MB of RAM... which is more than enough to run Linux.
Following the directions provided by the amazing Martin Michlmayr, you need a 1 gig or better external flash memory stick, and optionally, an external USB hard drive.
Flash the unsupported installer image onto the slug. SSH into the box. Install the five packages Michlmayr mentions. You now have a running version of Debian Linux up and running. This takes between an an hour and an afternoon, and should be doable with minimal admin skills.
So, there were a few updates worth making to the slug right away. Opening the case and using this simple hardware kludge to overclock the box from 133 to 266 MHz was trivial, only took a pair of fingernail clippers or an exacto knife, and doubled the speed of every other step.
It's worth looking at are the additional instructions on reducing Debian's memory usage.
If you installed to a flash drive and not a hard disk, you can look into ways to reduce the drive usage. Especially worthwhile is moving the swap partition off of the flash drive, and onto an external hard drive, if possible. Basically, flash media only gets a limited number of writes, and after that, that sector of the drive is permanently dead. Since swap space may be written to many, many times, it's the prime candidate for burning out the flash media.
Additionally, there are ways to make the box automatically upgrade itself every night.
As a side note, if your connections regularly die, the slug includes a small magnet that wraps around the Ethernet cable, to cut down interference. I'm assuming the size of the slug prevents them from building this into the unit. That said, without this magnet, my connections died fairly regularly. With this magnet, connections are stable for days.
I should have started with the most important detail, though. Why would you want Linux on this piece of hardware?
- My slug at home still runs as a drive server, but it can now use USB hubs to have more than two drives connected.
- Instead of just having Windows file sharing (Samba), it also supports AFS (Apple) and NFS (Unix/Linux).
- MT-DAAPD, which lets other computers in the house running iTunes see the slug as if it were running iTunes as well, and shares out the music on the external drive.
- rTorrent, a full-feature text-based Bittorrent client. Here's a link on autostarting it, and how to add an script to Linux to run on boot.
- OpenVPN, to allow VPN networking from anywhere back to my house. Including securely tunneling traffic from an iPhone over unsecured wireless networks.
- SSH tunnel endpoint, securely transmitting my chat and web requests from my public desk at work to my relatively private connection at home. Browsers and chat clients support this pretty easily as a SOCKSv4 proxy.
- DynDNS client, in order to report back it's public IP address to my DNS server, so that I can access it by name from anywhere.
- Apache, to serve static webpages (and MT-DAAPD).
- It doesn't have enough power to run a database application well.
- Due to that, it doesn't work as a dynamic webserver.
- It won't even run Ruby on Rails with SQLite, actually. It's tiny.
- It didn't support a Squeezebox server.
- MT-DAAPD (above) will choke if you give it too large of an MP3 library.
All in all, A+. I've actually bought a second one to leave at another location, for when my home connection is down.