Debian on my NSLU2: The Revenge of the Swirl

After some playing with Unslung on my Linksys NSLU2, I realize it was a “very limited solution” for our needs. We need to share 4 (sometimes 5) NTFS (or others) volumes, where everyone of them is 500GB: this is too much even for the modified firmware of Unslung, unable to read the full directory trees (and the contained files) of my massive movie’s collection.

So, I came back to the Debian/NSLU2 solution. This time, with all the intention to make it work.
It’s quite pointless to report here all the things I did to make it work in the way I want/need. I’ll just write down the most important bits:

  • Memory Optimization:
    • remove unused kernel modules (blacklisting in /etc/modprobe.d/blacklist)
    • remove unnecessary services/daemons (like exim4 or nfsd)
  • Mount volumes “by-label“, to avoid messes in mounting if the /dev files associated with the particular devices changes (reboot, unplug/replug, etc.) (take a look at this page for more info)
  • Use the noatime option in the /etc/fstab file to avoid the system to update the “last-access” field in the i-nodes: this is very important to reduce I/O on Flash memories
  • Reduce the swappiness of the kernel (reduce the I/O)
  • Install fuse and compile ntfs-3g by hand: on Debian stable it’s not available yet (I could have used stable-backports but no one compiled ntfs-3g for ARM :( )
  • Configure one Samba share for Disk. This avoid the problem of Samba calculating “free-space” when the sub-directory of a share is the mount point of a different disk.
  • De-underclock the NSLU2: the CPU (XScale-IXP42x Family rev 1 (v5l)) is soldered to the board with a pin configuration that makes it run half of is speed. I just removed the Resistor that realize that particular configuration. More info here and here.

Put this post/page on your Social Bookmarking System

These icons link to social bookmarking sites where readers can share and discover new web pages.
  • del.icio.us
  • digg
  • YahooMyWeb
  • Ma.gnolia
  • blogmarks
  • BlinkList
  • co.mments
  • Shadows
  • Furl
  • Digg
  • Google
  • Live
  • Reddit
  • Slashdot

11 Comments so far »

  1. Lelly wrote on May 19, 2008 @ 15:39

    Ma che stai inciarmando??? Casa tua è diventata una centrale elettrica!!! :-D

  2. Another Illegal wrote on May 27, 2008 @ 8:10

    Thanks for these bits of knowledge. I have almost the exact same setup as yours and have been trying to get it to work for a couple of days now. I was about to give up altogether before I read your post.

    I have a couple of questions:

    1. How did you install fuse “by hand”?
    This is what I am getting:
    :~# apt-get install fuse
    Reading package lists… Done
    Building dependency tree… Done
    E: Couldn’t find package fuse

    2. Did you compile ntfs-3g on the Slug itself?

  3. Detro wrote on May 27, 2008 @ 8:36

    1) To make “fuse” available as package, you need to activate all the repositories of your Debian. To do that, you need to update your “/etc/apt/sources.list“.

    Configure it to have something like mine:

    deb http://ftp.uk.debian.org/debian/ etch main contrib non-free
    deb http://security.debian.org/ etch/updates main contrib non-free
    

    After that, the “fuse” package should be available. (Don’t forget to give a “apt-get update“)

    2) Yes, I compiled by hand “ntfs-3g“: first, install the packages “build-essentials” and “linux-headers” (same versione of the kernel you are currently using); second, “download->./configure->make->make installntfs-3g.

    Hope this helps.

  4. Another Illegal wrote on May 29, 2008 @ 14:51

    It is all working now!

    The NSLU2 is now serving files right and left. Very impressive indeed.

    Thanks a million for your help

  5. Detro wrote on May 29, 2008 @ 17:47

    Glad to be helpful ;)

  6. killinmilk wrote on June 23, 2008 @ 13:13

    come hai risolto il problema dello share samba (su debian) e leopard che si schifano?
    con la 3.0.24 di samba e leopard aggiornato, non c’era verso di aprire su osx lo share perché voleva a forza user/pass

    su tiger ovviamente funziona senza il minimo problema

  7. Detro wrote on June 23, 2008 @ 14:25

    ehm… ho configurato samba per usare SOLO username/password: non ti dimenticare cosa ho studiato io ;)
    [SECURITY IS WHEN YOU DON’T TRUST EVEN YOURSELF]

  8. killinmilk wrote on June 23, 2008 @ 15:56

    ah ok, quindi il problema per me rimane -.-

  9. Detro wrote on June 23, 2008 @ 17:07

    Sia in Win che in Lin che in Mic (non ci stava bene Mac, non suonava :) ) puoi registrare lo username/pass e… scordartene.
    E continui a mantenere una certa sicurezza.

  10. killinmilk wrote on September 22, 2008 @ 17:15

    la discussione è un evergreen…

    ora, dopo aver messo samba con il controllo utenza, ho l’esigenza di mappare un nuovo disco. questa cosa del by-label è meravigliosa (ho visto che si può anche usare by-id)

    (mi sono già scontrato coi problemi che comporta avere due dischi sullo stesso switch usb; ovviamente lo slug voleva partire dal disco sbagliato. mi è toccato metterlo sull’altra porta usb)

  11. La lumachina « L’angolo della ricotta (salata) - Lisergico andante wrote on October 17, 2008 @ 10:48

    […] (ma forse è solo un problema mio, mah). Ho poi aggiunto un nuovo disco, e seguendo quello che aveva fatto detro, ho impostato il file fstab per fare il mount del disco “by-label” (impostando la label […]

Leave a Comment

Name: (Required)

E-mail: (Required)

Website:

Comment: