Detronizator.org

«Consider yourself Perfectible makes you Perfect!»

Debian on my NSLU2: The Revenge of the Swirl

with 11 comments

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.

The Debian/NSLU2's Reign

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 on your Social Bookmarking System

  • del.icio.us
  • digg
  • YahooMyWeb
  • Ma.gnolia
  • blogmarks
  • BlinkList
  • co.mments
  • Shadows
  • Furl
  • Digg
  • Google Bookmarks
  • Live
  • Reddit
  • Slashdot
  • Facebook
  • LinkedIn
  • MySpace
  • Tumblr
  • StumbleUpon
  • Wikio
  • E-mail this story to a friend!
  • Netvibes
  • Ping.fm
  • Print this article!
  • TwitThis
  • Wikio IT
  • Yahoo! Buzz

Written by Detro

May 17th, 2008 at 9:57 pm

11 Responses to 'Debian on my NSLU2: The Revenge of the Swirl'

Subscribe to comments with RSS or TrackBack to 'Debian on my NSLU2: The Revenge of the Swirl'.

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

    Lelly

    19 May 08 at 15:39

  2. 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?

    Another Illegal

    27 May 08 at 8:10

  3. 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.

    Detro

    27 May 08 at 8:36

  4. It is all working now!

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

    Thanks a million for your help

    Another Illegal

    29 May 08 at 14:51

  5. Glad to be helpful ;)

    Detro

    29 May 08 at 17:47

  6. 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

    killinmilk

    23 Jun 08 at 13:13

  7. 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]

    Detro

    23 Jun 08 at 14:25

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

    killinmilk

    23 Jun 08 at 15:56

  9. 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.

    Detro

    23 Jun 08 at 17:07

  10. 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)

    killinmilk

    22 Sep 08 at 17:15

  11. [...] (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 Reply