Continuing from the previous post, here was how I added an internal usb thumbdrive inside the Linksys NSLU2.
Step 1: Understanding the usb ports
The slug came with two external usb ports. The simplest way to add a thumbdrive as the root partition is to plug it to the port marked “Disk 1″. However, there is a better way. According to here and here, the slug has five physical usb ports! The three extra ports can be found inside the slug and were unused. Hence, you could connect the root partition thumbdrive to one of these internal ports, and still have two external ports available. Neat!
I suggest you read the NLSU2-Linux wiki pages carefully. There were some useful information in there that would come in handy for this hack.
Step 2: Reroute usb port 1 and 3
With three additional unused ports to choose from, I picked port 3.
Now, imagine this scenario. You add the root partition thumbdrive to the internal port 3. The thumbdrive is assigned as /dev/sda. However, you also have a usb drive for data, which you plugged to external port 1. What would happen during boot up? Port 1 has “higher priority” and get assigned to /dev/sda. Now, the boot loader can’t find your root partition, and the boot up fails.
There are solutions to this problem. One software solution is to use UUID instead of /dev/sdx. I opted for a hardware solution, by rerouting port 3 to “Disk 1″ connector, and use port 1 for the root partition thumbdrive.
Using a penknife, carefully cut out the pcb traces connecting port 1 to Disk 1 connector. I made the cut in two places: next to the connector pins and next to the vias above the “RP1″ print. Unfortunately, you can’t really see the cuts in the picture here, because they were blocked by the wires. However, the red arrows showed the exact locations of the cuts.
![]()
Why was it necessary to cut in two places? If you cut in only one place, the open ended traces might caused problem in signal integrity and corrupt the usb high speed communication.
Once the cut was made, I soldered two wires from R160 and R161 to Disk 1 connector. Now, port 3 has become Disk 1.
Step 3: Add a usb connector to port 1
Originally, I soldered two wires from port 1 to the thumbdrive directly. Later, I realized that whenever I wanted to access the thumbdrive via a PC (for diagnostic, or creating a backup/disk dump), I have to constantly take out the soldering. Finally, I scrounged up a usb connector and used that as the permanent internal port 1.
![]()
Refer to here for the usb pinout. Pin 2 and 3 were the data lines, which should be connected to R156 and R157. Pin 1 was the 5V power, while pin 4 was the ground. Take a look at the previous two pictures to see how I wired the power pins.
Here is a look at the completed board modifications.

One final thing to do. The internal usb thumbdrive has a LED. I cut out a small hole on the slug casing, and patched back the hole with a small blob of translucent hot-glue. It was a nice touch.

Now that the hardware modifications were completed, next posts will continue with the software.

Comments 2
Great modification! Unfortunately I’m a hardware and soldering n00b
and will have to live with external USB only.
Posted 24 Feb 2009 at 4:21 am ¶hi pacman
Posted 24 Feb 2009 at 12:09 pm ¶Thanks for reading!
Post a Comment