Skip to main content
19 votes
Accepted

Using ddrescue to shred only rescued portions of disk

The manual gives you an example which is almost exactly what you want: When ddrescue is invoked with the option --fill-mode it operates in "fill mode", which is different from the default &...
Kamil Maciorowski's user avatar
9 votes
Accepted

Why is ddrescue slow when it could be faster on error free areas?

I have been wondering whether this can be dealt with with the option -a or --min-read-rate= ... but the manual is so terse that I was not sure. Besides, I do not understand on what basis one should ...
frostschutz's user avatar
  • 52.1k
9 votes
Accepted

Recovering data from incomplete ddrescue iso

There is --generate-mode to try and guess a missing mapfile. Essentially it generates a mapfile that considers zeroes in the image as non-tried blocks. ddrescue --generate-mode /dev/sda sda.img sda....
frostschutz's user avatar
  • 52.1k
8 votes
Accepted

Recovery of damaged DVD yielding "no medium found" error

Initial Disk Quality Since we're not talking about a hard drive here, which can be recovered, you're sadly experiencing the reality that most consumer grade DVDs are NOT reliable. A physical hard ...
Lizardx's user avatar
  • 3,134
7 votes

Why is ddrescue slow when it could be faster on error free areas?

this is a bit of a necro post, but for anyone that might happen across this: I've been able to reproduce OP's behaviour and have gotten ddrescue to resume its maximum read speed by using its -O flag, ...
ParoXoN's user avatar
  • 171
7 votes

Which sector size shall I choose to run ddrescue with direct access on an Advanced Format drive?

I've exchanged emails with the author of ddrescue, Antonio Diaz, and he told me that the correct parameter to use with an "advanced format" drive (i.e., a drive with 4096-byte physical sectors, but ...
Dave Burton's user avatar
7 votes

Why does ddrescue not use distinct mapfiles for read and write errors? (And how to detect write errors?)

ddrescue doesn’t log write errors because write errors are fatal. Every time it needs to write a block, it keeps track of how many bytes it expects to write, and if that many bytes aren’t written ...
Stephen Kitt's user avatar
6 votes

How can I find out which files are lost through a ddrescue recovery atempt?

NTFS, ext3, ext4 After copying the data off your fail{ing,ed} drive with ddrescue, use ddrutility to find the affected filenames. I successfully got it to list affected NTFS files on a 1TB partition ...
Tom Hale's user avatar
  • 33.3k
5 votes

How can I find out which files are lost through a ddrescue recovery atempt?

I would recommend an already implemented utility called ddrutility. That would eliminate the manual tedious calculations. You should be running it on your cloned copy (not the original) drive device ...
Vladius's user avatar
  • 171
5 votes

Get contents of ddrescue image file

Since you created an image of /dev/sdb1, you only created an image of that partition (as opposed to /dev/sdb which would have been the entire drive) As long as the first partition was the one that ...
blihp's user avatar
  • 670
5 votes

Why does ddrescue not use distinct mapfiles for read and write errors? (And how to detect write errors?)

The badblocks program reports read errors, write errors, and corruption errors, see e.g. here. If you want to make sure your destination disk is good, run badblocks in destructive mode on it. But keep ...
dirkt's user avatar
  • 33.4k
4 votes

Why does ddrescue not use distinct mapfiles for read and write errors? (And how to detect write errors?)

Modern disks handle write failures transparently and automatically by remapping the failed sector to one of its spares available specifically for such a situation. You can see the status in SMART ...
Chris Davies's user avatar
3 votes

ddrescue .NTFS file can't open file

ddrescue takes the raw contents of a partition, disk, or even a file and writes them to either a partition, disk, or file; doing its best to grab all the content. When you rescue a partition to a ...
Emmanuel Rosa's user avatar
3 votes

Usage ddrescue with -d option?

In some circumstances -d (or --idirect) allows you to rescue more data. It's true man ddrescue shortly says it means use direct disc access for input file and this may not explain a lot. However ...
Kamil Maciorowski's user avatar
3 votes
Accepted

ddrescue: How to retry for 1 bad block after all other data is safely stored?

Yes, it is possible. You need to modify the mapfile's line: 0x1375BC000 0x00001000 - to contain question mark at the end like so: 0x1375BC000 0x00001000 ? Now you are ready to restart the ...
Vlastimil Burián's user avatar
3 votes

In ddrescue, should the target drive be formatted the same way as the damaged drive?

For me, the output drive "/dev/sdh", is brand new. Does it have to be formatted the same way as the input (i.e., damaged) drive? (In other words, if the input drive is NTFS, should the output also ...
sudodus's user avatar
  • 6,686
3 votes

How to change current copy position or skip over area in ddrescue

The full documentation of ddrescue (see info ddrescue) covers this example: Example 3: While rescuing the whole drive /dev/sda to /dev/sdb, /dev/sda freezes up at position 12345678. ddrescue -f /dev/...
stackprotector's user avatar
3 votes

ddrescue with USB Enclosure

Where do i write the log file (map file) […] Can I also write that to the new target disk? Create a filesystem on the target disk, mount it and tell ddrescue to write to a regular file in the ...
Kamil Maciorowski's user avatar
3 votes
Accepted

Is it possible to ddrescue only image files (jpg, png, etc.)

As cas explained in comments, dd rescue cannot just rescue image files (or any specific file type), it is used for making image copies of block devices. If block device is not corrupt then it can also ...
Shah Fahad's user avatar
3 votes

ddrescue only recovers subset of DVD

I upgraded to the latest version of Clonezilla and ddrescue now produces the correct sized ISO.
Fidel's user avatar
  • 405
3 votes

ddrescue on SD-card: Why is the output differing but no errors given?

Forgot to post a resolution to this problem. This answer has a solution to my original problem. I have a broken SD card and how to fix it. What I didn't find out is why neither the linux kernel nor ...
Ariser's user avatar
  • 303
2 votes

bitwise-OR 2 binary files

This is not bitwise or, but it works for (whole blocks of) zeroes: dd conv=sparse,notrunc if=foo of=baz dd conv=sparse,notrunc if=bar of=baz Due to sparse it skips writing anything that is zero in ...
frostschutz's user avatar
  • 52.1k
2 votes

bitwise-OR 2 binary files

Python with open('file1', 'rb') as in1, open('file2', 'rb') as in2, open('outfile', 'wb') as out: while True: bytes1 = in1.read(1024) bytes2 = in2.read(1024) if not bytes1 ...
Zaz's user avatar
  • 2,654
2 votes

In ddrescue, should the target drive be formatted the same way as the damaged drive?

The tool is a block copy. You're copying the entire drive so the partition table, filesystem structures and everything will be copied from the source to the destination. No. Emphatically no. You're ...
Chris Davies's user avatar
2 votes
Accepted

Datarescue with ddrescue location of files

Yes, NTFS has a tendency to allocate blocks at the beginning of a disk, but this is not necessarily so for all blocks. ddrescue has a --sparse option that: --sparse Use sparse writes for outfile. (The ...
Fabby's user avatar
  • 5,549
2 votes

SD card img created with dd is all zeros

I assume your Linux system is able to read working SD cards. "The device needed to be formatted" is the Windows message you would expect to see, when you insert an unformatted card, including one ...
sourcejedi's user avatar
  • 53.5k
2 votes
Accepted

ddrescue Understand

The man pages for ddrescue are here. The command options tell ddrescue to -f Force overwrite of block devices if you are not copying your data to a regular file. In this case the option will do ...
bu5hman's user avatar
  • 4,851
2 votes

GNU ddrescue to copy directories or folders from hard disk

That isn't for what the GNU ddrescue program is designed. You can, however, make a copy of a specific partition, from which you want to copy the data, rescue the partition, and then mount it and copy ...
Vlastimil Burián's user avatar
2 votes

GNU ddrescue to copy directories or folders from hard disk

Corrupted files and folders can be rescued up to a point by using TestDisk and its companion PhotoRec, available for all the major Linux distros, and included in freely downloadable rescue systems ...
user543544's user avatar
2 votes
Accepted

ddrescue creates image with no content

ddrescue (and dd) work on block devices (think disks or partitions) or files. You are trying to use ddrescue on a directory where a file system upon a block device is mounted. RE Cygwin, perhaps there ...
Peter Hubberstey's user avatar

Only top scored, non community-wiki answers of a minimum length are eligible