Mar 04 2008

Using the Slug as a music server

Tags: , , , , , , Filed under: Written in Englishhugo @ 6:09

Our Mac Mini finally died. It turned out that the random crashes I was seeing were due to hardware issues, namely the hard disk.

Its sole purpose was to share music, and act as a storage server. I looked at a number of options to replace it, including buying a new Mac Mini, or a low-end PC. I ruled the latter out because of form factor: I wanted a small box to hide in a corner. Mini PCs exist, but they are pretty expensive, and a new Mac Mini is about $600. It seemed wasteful to invest into so much horsepower to have it sit doing nothing most of the time, and streaming audio files once in a while.

Linksys NSLU2

I therefore decided to go with a more exotic solution: a Linksys NSLU2, which is a network box running Linux in which you can plug USB hard drives. There’s a lot of hacking going on on this device, and it is cheap: $60 on Amazon.

I was faced with the dilemma of choosing which firmware to install, out of the 9 flavors available. As a matter of fact, I experienced more than the dilemma, since I experimented with quite a few of them.

I wanted the following features:

  • Ability to run the firmware without a flash drive: flash drives are pretty slow, and not really designed to have repeated reads and writes that a root partition will get.
  • Media server available: this is the primary purpose of this box.
  • Multi-user support: I want to use it as a storage server for different servers.
  • Ability to spin down the hard drives attached to it: most of the time, the box is idle, so I don’t need to have the disks spin.
  • HFS+ support: I have some disks that were formatted on a Mac.

I ended up settling with OpenWRT, which has all those features:

  • Self-contained: It is very small and fits on the 5MB root partition of the Slug.
  • Media server: mt-daapd is installable via Optware.
  • Multi-user: adduser is available via Optware to help setup user accounts (though you could obviously do it by hand).
  • Spinning down drives: using the shell script from NSLU2-Linux with sg_start from Optware’s sg3-utils works beautifully.
  • HFS+ support: OpenWRT has a modern (2.6.21.6), well packaged kernel, that allows to install exotic modules as needed.

Amazingly, the 32MB of RAM are enough for the Web server used for configuration, the SSH server for login, the FTP server for file transfer, the media server for iTunes streaming, without the need of a swap device.

I did try alternative firmwares. DebianSlug is a fully-fledged Debian distribution, but it’s much bigger, and requires installation on an attached drive; it actually took me 3 tries to manage to install it, and for some reason, it broke after a few hours (I couldn’t log into the box any more!). SlugOS/BE would probably have worked, but it didn’t feel as polished as OpenWRT.

All in all, I’m happy about the solution that I ended up with: the NSLU2 with OpenWRT is a low-cost, low-energy solution, which works really well.


Feb 15 2006

Solved my Firefox crashes!

Tags: , , , Filed under: Written in Englishhugo @ 10:42

Ever since I upgraded to Firefox 1.5 on my Linux desktop, I had been experiencing crashes daily. As my browser has now been happily running for more than 2 days in a row, it looks like I found the culprit, and I thought I’d share the information here in case others are pulling their hair out.

So here’s what I did: I disabled TargetAlert, and Firefox is now very stable, and also faster.


Feb 09 2006

From Linux to OS X on my laptop: after 6 months, I’m still happy

Tags: , , , Filed under: Written in Englishhugo @ 10:23

About 6 months ago, I switched from Linux to OS X on my laptop. I had the feeling of betraying the Linux and open-source community when doing that, but I have to say that I’m pretty happy about the change.

With my PowerBook, things work, without me doing anything:

  • If I close the lid, the machine suspends, and when I open it, it’s back.
  • If I turn on my airport, it finds the networks very nicely, I click and I’m connected.
  • If I plug a USB device in, it usually is immediately usable (e.g. a printer, or a pen tablet).
  • If I need to print on the network, I’ll easily find the printer from the print window, click OK, and will be on my way to get your printed sheets.
  • If I need some extra piece of open-source software, DarwinPorts usually has it for me.
  • It never crashes and I never reboot other than for OS upgrades (and QuickTime upgrades, actually, for some reason).

When I compare this with how long it took me to have my built-in wireless working in my Compaq, ACPI sleep and software suspend which were randomly working at each new version of the kernel, I really can say that my Mac has made my life easier.

And because it’s a Unix machine, it took me only a couple of days to feel at ease with it, and I still read my mail with Mutt and OfflineIMAP, etc.

I’m sure people will say that if you choose the right laptop, things work out of the box, and that Gnome and KDE do all this. The truth is that, in my experience, it’s true to a certain point, but there’s always a point where you need to go and patch your kernel, look for some exotic driver for your modem. I never had a laptop with all its features working under Linux before at least a year of use, which is frustrating when you have a cool new laptop.
Of course, not everything is perfect:

  • Palm’s Palm Desktop is actually not as good as JPilot, and I haven’t gotten through the pain to setting jpilot and pilot-link up.
  • While it took me about 2 minutes at the back of a cab to be connected to the Internet over Bluetooth using my Sony-Ericsson T610 phone, I still haven’t managed to connect using my Treo 650, despite spending at least a couple of hours on it. I’m frustrated, as now, I’m really expecting things to just work.
  • FVWM let me do whatever I wanted, and the OS X interface doesn’t: for example, focusing on a window brings it to the front, but I unhappily got used to that.
  • The machine is slow compared to a PC laptop, but I think that the Intel-based Mac laptops will change that.
  • DarwinPorts is cool, but is not as cool as Debian’s apt-get, and things have to be compiled from source. Fink uses Debian’s apt-get and binary packages, but is way out of date (e.g. their version of Mutt is 1.3.25).
  • I had problems with the hardware after 1.5 months of use.

All in all, though, I’m happy about the switch. I saved a lot of time as things work out of the box. The PowerBook is not perfect, but it does its job pretty well for my use. And I’m of course still running Linux on my desktop which works like a charm.


Dec 08 2005

Airport Express Linux driver

Tags: , , Filed under: Written in Englishhugo @ 23:58

An Airport Express driver for Linux is now available.

I am not sure if it’s a good thing or a bad thing. I have now gotten used to OS X, and it works like a charm for most things (it’s just the fact that I can’t type in a window which is not in the foreground which annoys me) and I just finished reinstalling it all after I got my PowerBook back from the repair shop.

However, my 10 year long love story with Linux is hard to stop, so I now have the desire to try it out.

I am wondering if I can resize my HFS partition and play around with Linux a little to see what it’s like on a Mac…