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
exim4ornfsd)
- remove unused kernel modules (blacklisting in
- Mount volumes “
by-label“, to avoid messes in mounting if the/devfiles associated with the particular devices changes (reboot, unplug/replug, etc.) (take a look at this page for more info) - Use the
noatimeoption in the/etc/fstabfile 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
fuseand compilentfs-3gby hand: on Debian stable it’s not available yet (I could have usedstable-backportsbut no one compiledntfs-3gfor 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.


about 1 year ago
Ma che stai inciarmando??? Casa tua è diventata una centrale elettrica!!!
about 1 year ago
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?
about 1 year ago
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:
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 install”ntfs-3g.Hope this helps.
about 1 year ago
It is all working now!
The NSLU2 is now serving files right and left. Very impressive indeed.
Thanks a million for your help
about 1 year ago
Glad to be helpful
about 1 year ago
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
about 1 year ago
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]
about 1 year ago
ah ok, quindi il problema per me rimane -.-
about 1 year ago
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.
about 1 year ago
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)