NSLU2 means Network Storage Link for USB 2.0 Disk Drives. Also see here.
The NSLU2 supports different firmwares. The original one is rather outdated. The most used firmwares are:
- Unslung --- an add-on to the original firmware, keeping the web-interface and all standard features
- SlugOS/BE --- a firmware optimized for small devices; using
ipkgyou can install various applications/services
- Debian/NSLU2 --- a stripped down Debian linux with all things you know from Debian, but packages are not optimized for small memory devices
Bad network performance
My network consists of a WLAN repeater which bridges the network of my neighbor with mine. Access to the Internet is provided by a gateway in my neighbor's network. The NSLU2 device has severe problems downloading files from the Internet. All downloads stall after a few bytes. Some tests showed that my side of the network works fine but everything behind the WLAN bridge is almost unreachable from the NSLU2. All other devices in my network can use the Internet fine.
My current solution is using tcpwatch-httpproxy on my Desktop-PC and a file
~/.wgetrc on my NSLU2
with the contents:
timeout = 10 http_proxy = <my IP>:8080
Power button for shutdown instead of reboot
To make pushing the power button shut down the Slug instead of rebooting it, edit the file
/etc/inittab and replace the
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -r now
ca:12345:ctrlaltdel:/sbin/shutdown -t1 -a -h now
Afterwards do a
Since ARM packages from Debian are not optimized for small memory footprint, you might want to free up some memory by deactivating several services which are not needed.
To save even more memory, you could replace
dash in your
Exim4 is a complete mail exchanger. Most people will only need a simple MTA to send some logs to the admin. So
exim4 and use
If you don't have/use the serial console on the NSLU2, you should disable
getty. Edit the file
comment out the following line:
#T0:23:respawn:/sbin/getty -L ttyS0 115200 linux
Afterwards do a
If you don't use IPv6, you should blacklist the kernel module to save some more RAM. Add the following line
If you don't use sshfs or some other special features of OpenSSH, you could replace it by
If your DebianSlug doesn't boot and the root disk is perfectly clean, you might have a firmware problem. To create
a working firmware, you'll need the files
initrd.img-2.6.30-2-ixp4xx1 and the di-nslu2.bin (the DebianSlug installer image).
- make sure you have installed the packages slugimage and devio
di-nslu2.binto an empty directory and run this:
slugimage -u -i di-nslu2.bin
now copy the two other files also in that directory
prepare the kernel image: (This will pad the file to 1441760 Bytes and then switch the Endianess of the file.)
dd if=vmlinuz-2.6.30-2-ixp4xx of=vmlinuz-2.6.30-2-ixp4xx.padded ibs=1441760 conv=sync devio "<<"vmlinuz-2.6.30-2-ixp4xx.padded > vmlinuz-2.6.30-2-ixp4xx.swapped "xp $,4"
prepare the initrd image:
dd if=initrd.img-2.6.30-2-ixp4xx of=initrd.img-2.6.30-2-ixp4xx.padded ibs=6291440 conv=sync devio "<<"initrd.img-2.6.30-2-ixp4xx.padded > initrd.img-2.6.30-2-ixp4xx.swapped "xp $,4"
now compile the new firmware image:
slugimage -p -b RedBoot -s SysConf -L apex.bin -k vmlinuz-2.6.30-2-ixp4xx.swapped -r initrd.img-2.6.30-2-ixp4xx.swapped -t Trailer -o debianslug.bin
Finally you only have to burn the new image to the NSLU2 using upslug2:
upslug2 -i debianslug.bin
If you want to make changes to the
initrd, take a look at cyrius.com.
UPDATE: Here is a little script which does the above in a more comfortable way. Just throw it into the directory
together with the
vmlinuz-2.xxx. Download: emergencyfw.sh
both found in
/booton the root partition of the NSLU2-disk ↩︎