SmallNetBuilder

Saturday, Nov 21st

Hot Stuff!
You are here: NAS NAS How To Hacking the Linksys NSLU2 - Debian and more - Installing Debian

Hacking the Linksys NSLU2 - Debian and more - Installing Debian

E-mail Print
<< Prev - Page 3 of 5 - Next >>

Installing Debian

The last time I installed an alternate firmware onto my NSLU2 was quite a while back. At the time, the alternatives were few, so I went with the current Unslung firmware installed to 512 MB memory stick. This combination has been up for over a year now and is happily running a LAMP stack supporting one of my web sites. But as mentioned above, the Unslung firmware has some tradeoffs. When you would log into the device some things were not quite the same as a standard Linux system. Making changes would require tweaks, or maybe an obscure package was not available. Sometimes the busybox version of utilities used had slight differences from the standard equivalent, or maybe the filesystem layout was different than expected. Everything just felt a little "off".

So to check out the bleeding-edge development status of the NSLU2 project, I picked up a new NSLU2 from my local big-box retailer and proceeded to install the official Debian firmware. There's a nice installation guide here, but in the following sections, I'll show the steps I went through and the results I achieved.

I'll skip the standard NSLU2 setup you'd do to install the of-the-shelf device. But note that you'll need to have your NSLU2 fully working before you proceed to install Debian. Also note that Debian is designed to be installed on a hard drive so I wouldn't recommend trying to use a flash drive unless you're willing to tweak it afterward to avoid excessive writes that could burnout a flash drive over time.

The first step in loading Debian onto your NSLU2 is to acquire and install the debian-installer that is specifically built for the NSLU2. Debian-installer is the program that's responsible for bootstrapping and installing a standard Debian system on both PCs and devices like the NSLU2. The basic idea with the NSLU2 is that you burn the debian-installer as a new flash image, and then upon reboot, log in remotely using ssh and walk through a standard debian installation that downloads everything it needs across the Internet.

If everything were right with the world, you'd get the debian-installer image from the Debian site, but there are some complications. Intel wrote the Ethernet driver used on the NSLU2, and they add some license restrictions that prevent it from being included inside the official debian-installer. A free open-source replacement driver is in the works, but until it's ready, you'll have to pick up an unofficial debian-installer firmware here.

Once you have the image, there are a couple of different ways to install it. I chose to install the image using the standard Linksys firmware installation procedure. Figure 2 shows the NSLU2 upgrade screen where I have selected the debian-installer as the firmware to upgrade with.

Firmware Upgrade

Figure 2: Firmware Upgrade

At this screen, you select your image and hit the "Start Upgrade" button and wait for the completion message. But once again, things are sometimes more difficult than you'd like. Linksys has a long-standing bug where they miscalculate the available memory and issue an error as seen in Figure 3.

Firmware Upgrade Failure

Figure 3: Firmware Upgrade Failure

Depending on your situation, you may or may not see the same error. If you check out the Linksys support site, you'll see that they recommend running an "EraseAll" program to clear out flash when this error occurs, but the NSLU2 developers strongly advise against it because it has the potential to completely destroy your box. The easy solution, at least for me, was to disconnect my external drive, reboot and start the upgrade over. After I had done this, the flash upgrade went smoothly.




Related Items:

Debian now available for QNAP NASes
Debian adds selected NAS support
How To Install Debian on the QNAP TS-209 Pro
How To: Hacking the Linksys NSLU2 - Part 5- Moving to Unslung
Revolution by Buffalo Kuro Box
 
Comscore