fsck is just the original name. When they came out with new file systems they would need a specific tool for each one, efsck for ext, e2fsck for ext2, dosfsck, fsckvfat. So they made fsck the front end that just calls whichever is the appropriate tool.
First off, you're right about running fsck on the partition - fsck only works on filesystems, not entire disks. You can get a list of all partitions on the disk with fdisk -l /dev/sdd
.
You're filesystem type is probably ext3 (the default in most Linux distros), which means it will usually pass an fsck as long its journal is clean. fsck -f
will, as mentioned above, force a full check.
However, if you have read errors on the disk, no amount of fsck will help dd - since dd really doesn't care about the content of the disk.
To get dd to read the disk and continue on read errors, use dd conv=noerror,sync
, which will continue on read errors and append null bytes to any block when there is a read error.
After you have finished the backup, you should run fsck -f
on the clone to get it up and running again.
Another tip: If you backup the partition to a file, you can loopback mount it with mount -o loop filename.ext3 /mountpoint
. Also, say you are cloning a 200G partition to a 500G drive, you can then run resize2fs /dev/sdx1
(where sdx is your new drive, partitioned with a single 500G partition), and the filesystem will be resized to 500G.
Lastly, if the disk is in such a shape that it's giving you read errors, I would advise you to avoid turning the disk off and on until you're finished recovering data. In some failure modes, the disk will at some point simply no longer spin up or fail to be recognized by the OS, and at that point getting data out of the drive becomes quite expensive.
Best Answer
Yes. This was handled by
fsck
on some releases. If the partition is not listed in/etc/fstab
, then you will likely need to tell it the partition type. I've used this from a Linux CD to recover a partition Windows wouldn't boot from.Based on the comments below, the actual fixing is done by the
ntfsfix
program. It should be available, even if there is no program to run afsck
on and NTFS file system.