Friday, December 28, 2012

NSLU2: How to change the hard drive

To migrate the hard drive of your NSLU2 to a new one perform the two follwing steps:
Step 1: Copy the content of the hard disk to a new hard disk.
Step 2: Expand the partition to fill all the available space on the the new hard disk.


Step 1: Copy the content of the hard disk to a new hard disk.

 (in part from http://linuxcommando.blogspot.com/2008/06/show-progress-during-dd-copy.html )

Copy the content of disk 1 (mounted on /dev/sdb) to disk 2 (mounted on /dev/sdc ) (if adjust sdb, sdc, sdd, etc acording to your own configuration, you might use gparted to check the names). Block size below is 1M (1 mb):
$ dd if=/dev/sdb of=/dev/sdc bs=1M  

Follow the progress forof the process by executing the following command in an other command window:
$ kill -USR1  8789
Find the process ID by running the command (and replace 8789 acordingly):
$ pgrep -l '^dd$'
8789 dd
$

Step 2: Expand the partition to fill all the available space on the the new hard disk.

Install gparted, launch it. Expand the large partition on the disk to fill to take advantage of all the available space.Move the other partitions acordingly. Do not delete og shrink any othe the other partitions.

1 comment: