The goal of this project is to build a small server using a Linksys NSLU2 and Debian.
I bought my NSLU2 before Linksys shipped the “un-throttled”1) version so the CPU runned only at half of its possible speed. To solve this I had to remove a standard SMD resistor from the board.
% cat /proc/cpuinfo Processor : XScale-IXP42x Family rev 1 (v5l) BogoMIPS : 132.71 Features : swp half fastmult edsp CPU implementer : 0x69 CPU architecture: 5TE CPU variant : 0x0 CPU part : 0x41f CPU revision : 1 Cache type : undefined 5 Cache clean : undefined 5 Cache lockdown : undefined 5 Cache format : Harvard I size : 32768 I assoc : 32 I line length : 32 I sets : 32 D size : 32768 D assoc : 32 D line length : 32 D sets : 32 Hardware : Linksys NSLU2 Revision : 0000 Serial : 0000000000000000
Opening the case was quite easy and only took about 5 minutes (you can do it faster but I wanted to put the case together again
). Removing the resistor is a bit trickier because its really small2). The official tutorial recommend to use a soldering gun but I used a wire cutter instead, I own a really good soldering gun though3). On the left, the naked slug and on the right, the culprit which is about to get removed:
Removing the resistor with the wire cutter took only 1sec
:
The result is really impressive
:
Processor : XScale-IXP42x Family rev 1 (v5l) BogoMIPS : 266.24 Features : swp half fastmult edsp CPU implementer : 0x69 CPU architecture: 5TE CPU variant : 0x0 CPU part : 0x41f CPU revision : 1 Cache type : undefined 5 Cache clean : undefined 5 Cache lockdown : undefined 5 Cache format : Harvard I size : 32768 I assoc : 32 I line length : 32 I sets : 32 D size : 32768 D assoc : 32 D line length : 32 D sets : 32 Hardware : Linksys NSLU2 Revision : 0000 Serial : 0000000000000000
In order to install Debian on the NSLU2 I had to download the installer image. Note: If you like to use the inbuild NIC you have to choose the unofficial image which includes the ixp400 driver. Furthermore you need upslug2 in order to flash the NSLU2 firmware. If you use gentoo it`s as easy as doing a:
% emerge -a upslug2
To be able to flash the firmware of the slug the box must be in upgrade mode.
Then I used upslug2 to check if it`s able to find the NSLU2.
% upslug2 -d eth0 NSLU2 00:13:10:d6:1e:03 Product ID: 1 Protocol ID: 0 Firmware Version: R23V29 [0x2329]
Ok, found it
. Time to put the installer-image on the NSLU2.
% upslug2 -d eth0 -i di-nslu2.bin
NSLU2 00:13:10:d6:1e:03 Product ID: 1 Protocol ID: 0 Firmware Version: R23V29 [0x2329]
Upgrading LKGD61E03 00:13:10:d6:1e:03
. original flash contents * packet timed out
! being erased - erased
u being upgraded U upgraded
v being verified V verified
Display:
<status> <address completed>+<bytes transmitted but not completed>
Status:
* timeout occured + sequence error detected
7fffff+000000 ...VVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVVV
Rebooting... done
The slug will beep 3 times as soon as the debian installer is ready to be used. Then log in via ssh using user installer password install. The installation process is as straight forward as a Debian installation could be, no worries here
.
Like dolph, I ended up with a few gnome-libs after the installation. Like dolph I got rid of it using:
% aptitude remove gnome-mime-data % apt-get clean
After updating the package database the usual stuff followed:
/etc/hostsThis is outdated and might not work with recent kernel versions!
There`s currently no truecrypt package available so you have to compile it yourself. In order to do that you`ll need to install some other packages first, namely:
% apt-get install build-essential dmsetup linux-image-2.6
Download the truecrypt source at http://truecrypt.org. I put it into /usr/src/. You also have to apply a patch.
% cd /usr/src/ % ls -l % lrwxrwxrwx 1 root src 19 2007-02-14 22:33 linux -> linux-source-2.6.18 % drwxr-xr-x 20 root root 4096 2007-02-15 22:01 linux-source-2.6.18 % drwxr-xr-x 10 root root 4096 2006-07-03 14:40 truecrypt-4.2a % wget http://titanic.shipdown.de/pmwiki/uploads/truecrypt-4.2a-Dm-target.c--kernel-2.6.18-and-2.6.19.patch % patch -p0 truecrypt-4.2a-Dm-target.c--kernel-2.6.18-and-2.6.19.patch
Now lets compile it, this may take a few hours
4).
% cd truecrypt-4.2a/Linux % ./build.sh
After that you can install it using:
% ./install.sh
That´s it.
Here`s a guide about how to compile the latest rtorrent release on the NSLU2. Following this guide I got it working but didn`t use the –enable-align compiler flag (the compilation failed 2 times before while using it). Unfortunately the XMLRPC isn`t working at moment.
% cat /dev/mtdblock* > image
Sometimes it can happen that the NSLU2 refuses to boot into the system. One possible cause for this is when errors in the filesystem are detected during the boot process. By default fsck doesn't attempt to fix possible filesystem errors. You have to enable it in the /etc/default/rcS. To do so just plug the USB-pen into another computer, mount the filesystem and edit the aforementioned file as root.
FSCKFIX=yes
anyone get rtorrent working yet? i just ordered my slug from newegg
i leave for europe in a month and if it's not working by then i won't be seeding for a year
I have the rtorrent version provided by debian (unstable) working for a while now without problems. However, I`d like to get the latest stable rtorrent 7.4 working as soon as my slug is up again (21 days downtime already because I moved to another city
).
Any experience with cryptsetup/dmcrypt on your SLUG? If made some first tests and have noticed permanent 100% cpu usage?
2007/11/13 22:47Hmmm, haven't tried it yet. If I remember correctly there was a nasty bug within the dm-crypt packages for the NSLU2 which caused data-loss.
2007/11/14 13:09
After voiding the garantee by installing debian this howto also looks really interessting: http://www.nslu2-linux.org/wiki/HowTo/FattenYourSlug There are real freaks outthere