view · edit · print · history

Which USB Port Should I Use For my Root Device?

This article pertains to:

  • Unslung 6.x only

The choice of which USB port to use as the primary or root device (hard drive or flash memory stick) for the unslung NSLU2 is an important one, because it can often limit future choices, and be difficult to change. This article sets out to assist the new user in determining the best port usage strategy.

Before continuing here, please take a moment to read these Wiki articles:

Limitations and Constraints

  1. The root device for Unslung must be natively formatted by the NSLU2 (i.e. it is not sufficient that it simply be formatted as ext3).
  2. The root device must be 512MB or larger in size.
  3. The root device may be on either USB Port 1 or on USB Port 2, but it may not be on a USB hub with other storage devices of any sort.
  4. FAT-formatted devices will be recognized on any port.
  5. NTFS-formatted devices will only be recognized on USB Port 1.
  6. Multi-LUN devices such as USB flash memory card readers will only be recognized on USB Port 1.
  7. USB Hubs will only be recognized (for storage devices) on USB Port 1.
  8. If an unslung NSLU2 has a natively formatted device in each of USB Ports 1 and 2, then the configuration data will always be stored on the device in USB Port 1, regardless of which device is the root device.


Rule #1: The root device must be connected to USB Port 2.

One of the ports will always be consumed by the root device. Since clearly USB Port 1 is the most flexible port, plugging the root device into USB Port 2 and leaving Port 1 open for other devices is the most sensible choice.

But - a problem arises in one specific situation. If a system is Unslung following Rule #1, and a natively-formatted device is attached to USB Port 1, some Not So Very Good Things can happen. Skipping the gory details, the configuration data that used to be stored on the device in USB Port 2 will be copied to the new device in USB Port 1 and it will be used from that location going forward. Once this happens, the NSLU2 is now dependent upon both devices for proper operation. (User experiences as noted in the mailing lists seem to imply that the situation is not as simple as the previous sentences imply; and that the addition of a natively-formatted device to an already-unslung NSLU2 will lead to unpredictable but usually "bad" behavior.)

This leads us to the following:

Exception to Rule #1: If the NSLU2 will have two natively-formatted devices (one on port #1, and the another on port #2), the root device should be the one connected to USB Port 1.

By doing this, a certain amount of flexibility is sacrificed. However, the resulting Unslung system is only dependent upon the first of the two devices for proper operation. Note that this applies to both flash devices as well as disk drives; Unslung makes no distinction between the two.

Note also that this applies to both the situation at install time, as well as any future situation. If you do not follow this rule, and later plug a natively formatted device into port #1, the results will be unpredictable, but almost certainly bad. One outcome is loss of access to the slug via telnet, ssh and the web interface. If this occurs you will need to reflash the slug and unsling to the appropriate disc.

However, in 2.3R63 and unslung 6, if you do follow this rule, you can have odd unexpected behavior where the conf partition from the drive in slot 1 will be mounted for both drives - slot 1 and 2! This leads to very odd behavior with shares being "duplicated" with a tilde-1. e.g.: create "music" on the drive in slot 2 and reboot and you will have "music" pointing to a nonexistant spot on slot 1 and "music~1" pointing to the original spot on slot 2! Reboot again and both are lost. One way to resolve this is to only use a single natively formatted drive, and to use diversion scripts to mount the second drive as documented (temporarily) in Unslung.R63DiskBehaviour.

Another exception?:

I have customised my root device so that it has the ext3 native partitions (which I have unslung on to) but also has an NTFS partition on there. Since NTFS isn't supported by Port2, I have to connect the device to Port1. This isn't ideal since it wastes the other flexibilities of Port1 (being able to connect a hub etc) but seems to be the only option in my case.

But This is Just Wrong!

Yes. Using USB Port 2 for hard disks, and USB Port 1 for flash devices is contrary to the Linksys documentation. But consider that the documentation hasn't been updated since the product was released by Linksys, and they've fundamentally changed how the device handles storage in the R63 firmware. The Linksys documentation is simply out-of-date.

I'm Upgrading from Unslung 5.5 - Should I Switch Ports?

Unless Exception #1 listed above applies to you, just move the root drive from USB Port 1 to USB Port 2. Your network shares will change from "DISK 1" to "DISK 2" but that's a small price to pay for the increased flexibility, in most cases.

Regardless of which USB port is chosen, each upgrader is strongly urged to read Unslung.UpgradingToUnslung6 to better understand the types of upgrade and the potential problems and solutions for each approach.

Potential Points of Confusion

Marc writes:

Addition by marc (http://marc.waeckerlin.org(approve sites)):

Point "The root [...] may not be on a USB hub with other storage devices [...]." seems to be wrong.

Actually I am using two harddisk on the first port in a dual-harddisk-case, one (IDE-Master) is recognized as /dev/sdb, the other (IDE-Slave) as /dev/sdc. The second one, I had to enter manually to /etc/fstab. So, for me it works to have the root device an a second device both on Port 1. I am using a "Sharkoon Twin Drive".

Port 2 is still free, shall be connected to a TV-card vor videorecording later.


No, the original statement is correct; the case Marc describes in the paragraph above is a Multi-LUN device, not a USB hub. Multi-LUN devices are not recommended for use as a root device, as they are normally removable, thus which device becomes /dev/sdb may change. In this special case, the multi-LUN device is a pair of non-removable hard drives, which makes the determination of which is /dev/sdb and which /dev/sdc deterministic -- and thus it works. The original statement that root devices may NOT be on USB hubs stands.


view · edit · print · history · Last edited by mwester.
Based on work by mwester, marcwaeckerlinorg, pedxing, jjh, Rienk, garglebutt, Jon, K Carter, and apu.
Originally by mwester.
Page last modified on July 15, 2007, at 09:11 AM