Friday 22 January 2010

moving your filesystem to a new hard drive

Hi,

M back again after many days , i was facing a problem of moving my working partition to other HDD. Searched a lot (of course on Google) and found a very nice solution.

U just require two commands under your belt to make it possible.

Copying the / filesystem is as follows (assuming for the example the new drive is mounted at /media/temp):

find / -xdev -print0 | cpio -pa0V /media/temp

When you run this command, it will recursively copy everything on the / filesystem, without crossing over into other mounted partitions. It will properly handle any special files, and it will completely preserve permissions.

You simply would mount each of the new partition you want to copy onto and repeat this above operation for each of those. Upon execution, you will see a series of dots fly across the screen. Each dot represents a file that is being copied.

Bye For Now.

You can visit my second blog : devenix.wordpress.com

No comments:

Post a Comment