view · edit · print · history

The information on this page is obsolete, and could potentially render your Unslung NSLU2 inoperable.

You can find up-to-date information about installing Unslung on a USB flash disk at Ext3flash.

In case anyone is interested, I've uploaded my set of diversion scripts for the Unslung 1.2 firmware for use with a USB flash disk. I'm sure the scripts will also work with later versions of Unslung with minor changes.

See flash.tar at:



FTP the tar file to an Unslung NSLU2 and untar it in the root directory. Delete /sbin/swapon and replace it with /unslung/swapon. Finally, provide your own /opt/passwd file which will provide you with the accounts that you like.

If you don't want to run thttpd as your private web server, remove or rename the file /opt/webserver.conf. Else, edit it as you like.

inetd.conf assumes ftpd is already installed in /bin.


touch /FLASHROOT if you are booting from a flash based device.

The major goal of these scripts are to minimize flash writes as well as to start services I'm interested in, and fix a couple of Linksys bugs.

Here is a brief description of what is there and why:


remount root with -o noatime


fix etc/mtab, move mount of /tmp to earlier in the boot


run my personalized startup script, remount /share/flash/data -o noatime


make /dev, /tmp, /var/lock, /var/run as ramfs.

UPDATE: I added the line "chmod a+rwxt /tmp /var/tmp" after the creation of /tmp...


disable swap device


enable telnet, ftp


enable 2nd webserver

opt/passwd (missing)

you need to supply your own passwd file...


This is a binary copy of thttpd. This avoids problems with the WatchDog script.

With these changes and *if* the file /FLASHROOT exists, I boot can my NSLU2 from flash with minimal writes to the root device. I tested these scripts with and without /FLASHROOT set.

There are some changes if you don't set /FLASHROOT. For example, /tmp is mounted as tmpfs (to take advantage of the swap space) and /var/log is not mounted as ramfs (so that /var/log/messages persists across reboots).

If you diff the files v.s. the originals, it should be pretty obvious what I did and why. If you have any questions/suggestions let me know.

Obviously, the files I stuck in /opt belong somewhere else, but I had to put them somewhere. Also, the rc.unslung script is something that not everyone might want (or implement the way I did). Finally, those that use the second webserver need to be aware of port conflicts with the default Linksys webserver.

Cheers ...

Using V2.3R63-uNSLUng-6.8-beta, I was not able to get a large data partition on my Flash disk. It seems things have changed in the new version. Using the below procedures, I was able to use all of a 2 Gig Flash disk.

It seems that this only works, for me at least, if I use the Flash in Disk 2.

1. Using cfdisk, in Linux, I partitioned the flash as 1.8 Gig for sda1, 130Meg for sda2 and 60 Meg for sda3.

2. I did a mke2fs -j /dev/sd[1,2] and a mkswap -c -v1 /dev/sda3

3. With no other disk attached to the NSLU, and with power off, I put the Flash in Disk2, and crossed my fingers.

4. Fired up the NSLU, and when it completed its turn on, I went to the Web interface and had to click, Format disk 2

   as it 'said', not Formated.  Sure enough, it came up formated.   I then enabled Telnet and logged in and ran
   df.  Here is what I got
  1. df

Filesystem 1k-blocks Used Available Use% Mounted on

rootfs 6528 6348 180 97% /

/dev/mtdblock4 6528 6348 180 97% /

/dev/mtdblock4 6528 6348 180 97% /dev.state

/dev/mtdblock4 6528 6348 180 97% /var.state

/dev/sda1 1730136 32856 1679704 2% /share/flash/data

/dev/sda2 122963 4142 117552 3% /share/flash/conf

  With 1.7 Gig I now have plenty of room for packages and no longer have to worry about running out of space.

Good Luck

view · edit · print · history · Last edited by fcarolo.
Based on work by fcarolo, rwhitby, Wayne Topa, tman, a, and mrthreeplates.
Originally by mrthreeplates.
Page last modified on November 16, 2006, at 05:20 AM