view · edit · print · history

What is RamHackU2?

A silly name for the first hacked firmwares that appeared for the NSLU2.

What defines RamHackU2?

It is a nearly 100% stock Linksys firmware, but with a few lines added to run startup script(s) to install your favorite hacks. This means it boots from and retains the firmware's ramdisk.

Why keep this approach around when there are more sophisticated firmwares available?

Well, it does have some advantages that a few might find useful. In particular, users of flash drives might like its simplicity.


  • You can still use a single VFAT partition (this means your USB disk is still easily Windows interoperable).
  • Each boot is clean with no residue from prior boots (e.g. repeatible).
  • No regular NSLU2 state is kept on the disk (e.g. no passwords, etc). This is really a side effect of Linksys's lack of support for USB flash drives on the NSLU2. See the FAQ.
  • Minimizes writes to the usb device (reducing write wear).
  • Mods to stock firmware are trivial (simplicity).

Of course, there are disadvantages:

  • No extra RAM (only 7MB free after boot).
  • Hacks need to be installed every time at boot.

Two sample firmwares can be found at:

I'll describe how to use one of them in a usb flash disk configuration:

  • NSLU2_V23R25_rc_flash.bin.gz

This firmware was constructed by taking the stock linksys firmware and (with the use of the slugtool) added 4 lines to the /etc/rc.d/rc.local.

if [ -f $F ] ; then
/bin/sh $F >$F.out 2>&1

That's it, no other changes.

Note: that flash drive users occasionally have problems upgrading firmware with the flash drive installed. Remove the flash drive first. See the FAQ for more info.

In order to have fun with your NSLU2, you will also need to create a rc.flash file. You can use and take a look at what I did. Go to:

And download the following files:

  • hacks_romfs.tar
  • romfs.tar.gz

Extract and untar them both in the /share/flash/data directory of your flash drive.

See the following posts for more details:

Re: the firmware:

Re: The hacks_romfs.tar

Re: The romfs.tar.gz

Finally, A few extra issues I've discovered along the way:

For further write wear minimization, try remounting your flash disk with noatime as described in:

You can do this easily with a simple script in your hacks/rc.d directory (not yet provided...).

Since the USB flash drive is still formated as VFAT, you can't use any of the chmod, chown commands on files. This has implications as you have to be careful how you configure security (e.g. for your web server and/or ftp server).

If you intend to use the thttpd web server, see the HowTo Recipes section for instructions. You will want to copy and rename the thttpd binary to avoid the problem with the WatchDog script. This will require some slight modifications to your startup scripts in your hacks/rc.d directory. You should also carefully review your web server .conf script to make sure thttpd is setup the way you want.

Additional info on configuring the ftpd server provided in romfs above:

If you are using WinZip to untar and extract the files to the flash drive on a Windows box (as I did) then you must set the option in WinZip NOT to change the CRLF formatting:

Options -> Configuration... -> Miscellaneous
uncheck: TAR file smart CR/LF conversion

view · edit · print · history · Last edited by endecotp.
Based on work by tman, mrthreeplates, ka6sox, MattMcN, and rwhitby.
Originally by rwhitby.
Page last modified on February 07, 2006, at 08:15 PM