view · edit · print · history

This page was created after disinterest with the explanation on page SwapDrivesOnUnslung.

The time will come eventually when you'll want to attach a larger hard drive to your NSLU2 -- but we want to keep the data, right? Let's do it.

You'll need Norton/PowerQuest(approve sites) PartitionMagic v8(approve sites) to use this method.

  • Telnet into slug.
  • Scan/fix drive errors in Linux here first (see RepairingDiskErrors for details):
    /sbin/fsck.ext3 -f -y /dev/sda1
    /sbin/fsck.ext3 -f -y /dev/sda2
  • Shut down slug.
  • Replace drive in USB enclosure with new one and connect to WinXP? box.
    Also attach original drive to computer (either through another enclosure or internally, temporarily).
  • Run scandisk on any FAT32? partitions you may have on the original drive.

Finally, here's the important stuff:

This method is designed specifically for if you have a hddvfat share drive, but is still otherwise applicable.
If someone has a way to instead re-order the appearance of your partitions after creation (sda1/2/3, etc.) short of hex-editing the part-table, please post your method.

If you want to have all of this performed INSIDE WinXP? without restarting to commit changes, you'll want to remove drive letters assigned to any of your partitions. This can be forcefully done by right-clicking on "My Computer" on the desktop, select "Manage" -> [Disk Management] -> right-click on partition to modify -> "Change drive letter..." -> "Remove" -> "Yes" to force it

Here's my configuration:
*** source drive ***

[4GB Ext3][108GB FAT32 Logical              ][2GB Ext3][54MB Swap]

/dev/sda1 Journaling Linux Ext3 "data" (type 83)
/dev/sda4 Extended partition, encapsulating FAT32? partition(s)
/dev/sda5 FAT32? data partition
/dev/sda2 Journaling Linux Ext3 "conf" (type 83)
/dev/sda3 Linux Swap (type 82)

*** destination drive ***

[154GB Unformatted                                               ]

For your new drive to work, it is necessary to copy the partitions in the correct order. (ie: sda1-5 partitions must be created in that order)

  • Copy "data" partition to beginning of free space on new drive.
  • Resize as you may (I made it 8GB).
  • Copy "conf" to beginning of free space.
  • Resize as you may (I left it at 2GB).
  • Create Linux Swap partition at end of free space (I chose ~128MB).
  • Move "conf" located on new drive now to end of free space.
  • Create Extended partition to fill up the rest of free space. (doesn't really matter what "format" you choose. I chose "Unformatted")
  • Delete the encapsulated logical partition.
  • Copy original Logical FAT32? to beginning of free space.
  • Resize to take up remainder of free space.
  • Mash "Apply"

...and away we go! After a while, I have this:
*** destination drive ***

[8GB Ext3][144GB FAT32 Logical             ][2GB Ext3][133MB Swap]

  • Close PartitionMagic?.
  • When you are certain drive activity has ceased, unplug the enclosure and boot it up with your slug to test everything
    (HTTP/FTP, Samba access, Telnet structure intact, etc).
  • If satisfied, ONLY THEN empty the original drive.
  • Rejoice in fulfillment of yet another successful NSLU2 upgrade.

view · edit · print · history · Last edited by CelticWonder.
Originally by CelticWonder.
Page last modified on February 20, 2006, at 07:20 PM