Linksys NSLU2
The Linksys NSLU2 (a.k.a. SLUG) is a network storage link based on the IXP42x processor clocked at 266Mhz (older versions of the NSLU2 defaulted to 133MHz, but can be easily "de-underclocked"). It contains 8MB flash, 32MB RAM, one ethernet i/f, two USB2.0 ports, and is provided with a 2.0A 5V power supply.
Why Run OpenWRT?
The SLUG has an active user community with several popular firmware distros (e.g. Debian Slug) so why bother to port OpenWRT? Well, most likely you agree with OpenWRT's minimalist philosophy and would rather spend your time adding the features you want rather than deleting those you don't. However, that doesn't mean that you should ignore the vast amount of experience gathered and documented by the SLUG developers…
Note that the NSLU2-Linux project (http://www.nslu2-linux.org) fully supports the porting of OpenWRT to the NSLU2, and intends to "bless" OpenWRT as the firmware of choice for people who want to run all their applications from the internal flash memory only (i.e. with no external storage at all).
NSLU2 Hardware Reference
Status of the Port
Users have confirmed successful installations of Kamikaze images mentioned under "Installation Instructions". Some outdated comments on earlier versions can be found here: http://wiki.openwrt.org/toh/linksys/nslu2?rev=1294425411
In case of problems, things to look out for are:
- The default IP is the one that is set in the NVRAM, so OpenWRT will boot up with the IP it had under the former firmware. This is not the default for other Kamikaze platforms! Note: This is not true for Kamikaze SVN (tested with r8003). Note2: On upslugging the default IP of NSLU2 is 192.168.1.77 (the same as the factory, Unslung and SlugOS behaviour) as of 08-2007. As of 8.09 RC1 the default IP is 192.168.1.1.
- Tip for dealing with 8.09 RC1 defaulting to 192.168.1.1 . If your router uses the same IP address, you can use arp to let you connect to the NSLU2. For example, run "arp -s 192.168.1.1 00:04:5a:aa:bb:cc" (using your NSLU2s MAC address) on your client machine. Once you telnet to the NSLU2, edit /etc/config/network to change the IP, and run /sbin/reboot to restart the device, you can reset your arp table by running "arp -d 192.168.1.1"
- After initial installation with the squashfs firmware, it can take up to five minutes to initialize the jffs2 payload partition. I would wait at least this time before you reboot it forcefully (although unplugging it while it is initializing didn't harm it in my tests)
- The status LED indication differs from openslug. It is always amber for me (whereas openslug turns green after bootup is complete). This might confuse users migrating from openslug.
Installation instructions
Kamikaze 7.06
You can download the image from the kamikaze-7.06 dir http://downloads.openwrt.org/kamikaze/7.06/ixp4xx-2.6/openwrt-nslu2-2.6-squashfs.bin. Then install the upslug2 utility. Many distributions already include it in their package management. You will find more information on the topic on the excellect NSLU2-Linux wiki http://www.nslu2-linux.org/, specific information on upslug2 is at http://www.nslu2-linux.org/wiki/Main/UpSlug. Then set the NSLU2 into upgrade mode. To do this, make sure the NSLU2 is turned off. Then press the reset button with a paper clip or small screwdriver and keep it pressed. Turn the NSLU2 on. The "Ready/Status" led will be yellow. When it changes to a reddish amber shade, immediately release the reset button. If it flashes an alternating amber and green, you have succeded (if not, unplug and try again). Now upslug2 should find the nslu2 over the LAN and display the information. Install the image with upslug2 -i filename. It will flash and verify the upload and then reboot automatically - this is what I call a comfortable firmware interface :)
The NSLU2 will take a few minutes to initialize the JFFS2 partition, don't reboot if you cannot access it immediately. It will start up using the network parameters that are stored in the NVRAM partition, so it will default to DHCP (I think) if not setup differently. If you have set a fixed IP under the original firmware or a previous linux distribution, OpenWRT will retain this. Try telnet and ping to access it. Then follow the standard Kamikaze installation procudures.
Kamikaze 8.09.2
Update January 2011: I successfully installed Kamikaze 8.09.2 on a NSLU2 using this image: http://downloads.openwrt.org/kamikaze/8.09.2/ixp4xx/openwrt-nslu2-squashfs.bin. The above "Installation Instructions" are still valid. As i used a Windows PC to flash the NSLU2, i used the Sercomm Flash Utility form here: http://www.nslu2-linux.org/wiki/Main/SercommFirmwareUpdater . After flashing the device was reachable under 192.168.1.1.
Backfire 10.3.1-RC
January 2011: I installed Backfire on my NSLU2, and it works just fine. After following the instructions for USB 2.0 support I could successfully mount my external harddisk. I haven't bothered to setup auto-mounting yet. Even USB audio works fine after installing kmod-usb-audio. — Georg Sorst 2011/01/18 00:18
Backfire 10.03
January 2011: Installed Backfire on stock NSLU2 without any problems and works great. Added "option gateway xxx.xxx.xxx.xxx" and "option dns xxx.xxx.xxx.xxx" to "option ipaddr xxx.xxx.xxx.xxx", "option netmask xxx.xxx.xxx.xxx", and "option proto static" and kept the static setup with actual desired IP. Followed the instructions on USB support below. Used samba3 instead of samba-server so that I would not have to use regedit and problems connecting with Vista and newer Microsoft OS. Would recommend Backfire 10.03 to other NSLU2 users. — OddballHero 2011/01/31 12:57
USB 2.0 Support
Update January 2011: After having installed Kamikaze 8.09.2 i followed http://wiki.openwrt.org/inbox/howto/install-usb-support#modules.for.usb.2.0 in order to have USB-Support. The instructions are still valid and USB-Support works without problems. I used the following commands (you can copy and paste them into your ssh-terminal window):
opkg update opkg install e2fsprogs cfdisk fdisk swap-utils usbutils opkg install kmod-usb-core kmod-usb2 kmod-usb-ohci kmod-scsi-core kmod-usb-storage kmod-usb-serial opkg install kmod-fs-msdos kmod-fs-nfs kmod-fs-nfsd kmod-fs-ntfs kmod-fs-vfat kmod-fs-ext2 kmod-fs-ext3 opkg install kmod-nls-base kmod-nls-cp437 kmod-nls-cp850 kmod-nls-utf8 kmod-nls-iso8859-1 kmod-nls-iso8859-2
After installing these packages, about 53% of the internal storage remains:
root@nslu2:/mnt# df Filesystem 1k-blocks Used Available Use% Mounted on rootfs 1472 1472 0 100% / /dev/root 1472 1472 0 100% /rom /dev/mtdblock5 4992 2324 2668 47% /jffs mini_fo:/jffs 1472 1472 0 100% /
external USB Stick / Hard Disk Drive
Update January 2011: I connected a 4 GB USB Stick (formatted with NTFS) which immediately showed up in /mnt/usbdevice. I could read the contents of the stick but not write to it (TODO: add instructions for NTFS write support). I repartitioned and reformatted the USB stick with ext3 and followed http://wiki.openwrt.org/oldwiki/usbstoragehowto (Section: Installing and using OPKG packages in mount point other than root). Installing packages on the USB Stick works flawlessly.
Update 2011/1/31 by OddballHero: Used ntfs-3g to be able to access with NTFS write support. Sometimes ok, other times get errors. Just switched to Ext3, works flawlessly. It is a Linux system, might as well use completely native system.
USB-Hub
Update January 2011: Contrary to some other postings in the forums i can confirm that connecting devices via an additional USB Hub works (using version 8.09.2). I use a cheap model (manufactured by EDNET, 4 ports, 8 Euros) with external power supply. I tested it on both USB-ports of the NSLU2 successfully.
Samba3 sample smb.conf
For system that will interact with Vista and newer Microsoft OS, it might be worth it to install samba3 instead of samba-server. No need to use regedit and less problems in the future. Sample smb.conf for samba3 (please modify to fit your security needs and system requirements):
[global]
netbios name = OpenWrt
workgroup = WORKGROUP
server string = NSLU2 OpenWrt Samba Server
syslog = 10
encrypt passwords = true
passdb backend = smbpasswd
obey pam restrictions = yes
socket options = TCP_NODELAY
unix charset = ISO-8859-1
preferred master = yes
os level = 20
security = share
guest account = root
invalid users = guest
smb passwd file = /etc/samba/smbpasswd
[HDD_1_1_1]
comment = NSLU2 OpenWRT HD 1
available = yes
browseable = yes
public = yes
writeable = yes
create mask = 0777
path = /mnt/drive1
read only = no
guest ok = yes
Leds and Beeps
Backfire 10.03 has most of the lights turned off (except for Ethernet) so use either the Luci web management (Administration→System→LED Configuration) feature (works quite well) or edit the /etc/config/system. GPIO Connections: http://www.nslu2-linux.org/wiki/Info/GPIOConnections has some information to help with the setup. Sample /etc/config/system entry:
config 'led'
option 'name' 'GPIO2'
option 'sysfs' 'nslu2:green:disk-2'
option 'default' '1'
option 'trigger' 'default-on'
Where additional choices for sysfs are 'nslu2:green:disk-1', 'nslu2:green:ready', and 'nslu2:red:status'.
Package repositories
Look at the OpenWRT page on NSLU2-Linux wiki for more information on publicly available NSLU2 package repositories.
NSLU2 "optware" stable packages can be found here: http://ipkg.nslu2-linux.org/feeds/optware/openwrt-ixp4xx/cross/stable/
NSLU2 "optware" unstable packages can be found here: http://ipkg.nslu2-linux.org/feeds/optware/openwrt-ixp4xx/cross/unstable/
see also http://wiki.openwrt.org/doc/packages within this wiki.
Troubleshooting
Some useful commands for troubleshooting:
| command | Description |
|---|---|
| logread | show syslogd messages |
| cat /proc/meminfo | |
| dmesg | will show kernel infos |
Links
in addition to this wiki information on the NSLU2 and OpenWRT can be found here: http://www.nslu2-linux.org/wiki/OpenWrt/HomePage
A lot of HOWTOs can be found here: http://www.nslu2-linux.org/wiki/HowTo/HomePage
Specific configuration
Interfaces
The default network configuration is:
| Interface Name | Description | Default configuration |
|---|---|---|
| eth0 | LAN | 192.168.1.1/24 |
Switch Ports (for VLANs)
Since this device contains no Switch, there are none.
Failsafe mode
If you forgot your password, broken one of the startup scripts, firewalled yourself or corrupted the JFFS2 partition, you can get back in by using OpenWrt's failsafe mode.
Boot into failsafe mode
- Unplug the router's power cord.
- Connect the router's LAN1 port directly to your PC.
- Configure your PC with a static IP address between 192.168.1.2 and 192.168.1.254. E. g. 192.168.1.2 (gateway and DNS is not required).
- Plug the power on and wait for the DMZ LED to light up.
- While the DMZ LED is on immediately press any button (Reset and Secure Easy Setup will work) a few times .
- If done right the DMZ LED will quickly flash 3 times every second.
- You should be able to telnet to the router at 192.168.1.1 now (no username and password)
What to do in failsafe mode?
NOTE: The root file system in failsafe mode is the SquashFS partition mounted in readonly mode. To switch to the normal writable root file system run mount_root and make any changes. Run mount_root now.
- Forgot/lost your password and you like to set a new one
passwd
- Forgot the routers IP address
uci get network.lan.ipaddr
- You accidentally run 'ipkg upgrade' or filled up the flash by installing to big packages (clean the JFFS2 partition and start over)
mtd -r erase rootfs_data If you are done with failsafe mode power cycle the router and boot in normal mode.
Buttons
The Linksys NSLU2 has one button. See nslu2.hardware.button for some options with that.
Basic configuration
Since this part is identical for all devices, see Basic configuration.
Connect stuff to the USB port
To connect stuff to the USB port, please see Connect stuff to the USB port.
TODO
add links to tutorials for
configuring samba See Basic configuration for samba and nfs.
- configuring ntpd
- configuring syslog-ng
- shut down via power button ( https://forum.openwrt.org/viewtopic.php?id=25253 )
see howto above
Little endian images?
Tags
toh/linksys/nslu2.txt · Last modified: 2013/06/15 18:59 by lorema
This text is licensed under a Creative Commons Attribution-ShareAlike 3.0 Unported License.
