On 8/21/06, Istvan Gabor <suseuser04@freemail.hu> wrote:
Hello:
I've got a hard disk with a vfat partitition which I'd like to backup using dd. I tried: dd if=/dev/hdc1 of=/mnt/bakup-dd where /dev/hdc1 is the vfat partition and on /mnt is a mounted ext3 partiton. It gave this result: dd: reading `/dev/hdc1': Input/output error 510656+0 records in 510656+0 records out 261455872 bytes (261 MB) copied, 101.931 seconds, 2.6 MB/s
What would be the correct dd command to back up the whole vfat partition as a file in an ext3 partition?
Thanks, IG
Istvan, Someone else mentioned dd_rescue, but more often than not, that is overkill. You just need to use a dd command that is more tolerant of the occasional disk i/o error. (i'm assuming you don't have hundreds of thousands of them). I use: dd if=/dev/hdc1 of=/mnt/bakup-dd bs=4k conv=noerror,sync bs=4k is purely a speed issue. I don't remember the details, but if you don't use it, dd will sometimes take 10x or more longer than if you do use it. Has to do with kernel buffering. conv=noerror,sync is the critical piece for you. noerror says that if there is an error continue performing the dd (ie. don't error out like your command did). sync says if there is an error fill in the unreadable block with nulls. Unfortunately, the default is just to ignore the input block with the read error, so if you don't use sync, each disk error causes the backup file to be shorter by a block. But the missing data is not from the end, it is right out of the middle. If you ever had to restore that backup, you would have nothing but garbage after the missing block. HTH Greg -- Greg Freemyer The Norcross Group Forensics for the 21st Century