22/07/2010

ntfsclone - a nice tool for dealing with ntfs partitions

Again another crashed harddrive... (maybe we should start a counter on this blog how many crashed harddrives we already got through?)

By chance, I fell over a tool called ntfsclone using gparted, because in the error analysis of the damaged harddrive showed up a tool tip to use ntfsclone to get an image of the partition before doing anything else.

Usage for getting a complete image in case of damage is fairly easy: install ntfstools, connect the questionable drive to your system and have another one ready, where you have enough file space available using a file system, which can deal with large files (not FAT(32)...) or split the image of the questionable drive with the options given on this web page. Become root on a console and cast the command
ntfsclone --rescue /dev/partitionyouwanttoclone -o /mountpoint/yourimagename.img
The --rescue option will the program force not to stop when reading errors occur.The written image is (hopefully for you) mountable via the loop-option of the mount command -see this post.
mount -t ntfs -o loop,ro /pathtoyourfile/filename.img /mountpointyouwanttouse

If you experience error messages regarding a corrupted ntfs file system, you might want to add the "-f" option to force mount to make the image readable available to be able to restore as much data as possible.

This tool is apparently helpful as well, if you want to keep a working windows installation as an image for a fast restore.

No comments: