Take the 2-minute tour ×
Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems.. It's 100% free, no registration required.

I'm very new to terminal and Linux so apologies! I have a crashed external hard drive that is spinning but wont appear on the desktop. I ran safecopy from terminal and this is what it said at the end

Description of output:
. : Between 1 and 1024 blocks successfully read.
_ : Read of block was incomplete. (possibly end of file)
    The blocksize is now reduced to read the rest.
|/| : Seek failed, source can only be read sequentially.
> : Read failed, reducing blocksize to read partial data.
! : A low level error on read attempt of smallest allowed size
    leads to a retry attempt.
[xx](+yy){ : Current block and number of bytes continuously
             read successfully up to this point.
X : Read failed on a block with minimum blocksize and is skipped.
    Unrecoverable error, destination file is padded with zeros.
    Data is now skipped until end of the unreadable area is reached.
< : Successful read after the end of a bad area causes
    backtracking with smaller blocksizes to search for the first
    readable data.
}[xx](+yy) : current block and number of bytes of recent
             continuous unreadable data.

I don't know what to do next? Is it telling me that it cannot be resurrected or is it telling me that it is waiting for me to do something?

share|improve this question
That looks like documentation about the output format. Didn't it print anything else before/after that? –  Mat May 12 '12 at 15:10
What is the exact command you gave? –  jippie May 12 '12 at 16:12

3 Answers 3

I'd like to kindly point out that Daniel's answer is incorrect. The stage#.badblocks files tell safecopy which blocks are bad on the source. Empty files would tell safecopy that there are no damaged blocks (I think).

Anyway, the standard procedure is:

safecopy --stage1 /dev/source output.img

which will copy the entire source and mark the bad blocks in stage1.badblocks. At this point, any data that is readable will be saved (ie. the data won't be corrupted any further).

safecopy --stage2 /dev/source output.img

which will try reading the bad blocks marked in stage1.badblocks with no retries and then mark the exact boundaries of the bad areas in stage2.badblocks.

safecopy --stage3 /dev/source output.img

which will continuously retry to read the bad areas marked in stage3.badblocks.

Note that later stages can take an incredibly long time to complete if the previous stages were not run.

share|improve this answer
After the image is made, how do you mount/open/view it? Since the image is of the entire file system, and not just a partition, I am having trouble using it. –  Nate Oct 27 at 15:19

You ran safecopy without any options, so it printed out usage information. You need to give it options so it knows what to do, man safecopy will show you the manual, like this one. One possible combination would be

safecopy --stage3 source dest

Where source is your broken drive, and dest is where to copy the rescue data to.

share|improve this answer

It seems to require you to create the file to write to first. So run touch stage1.badblocks in the folder you're going to back up to. Then run safecopy --stage1 /dev/source /media/otherdrive/stage1.badblocks and it will run the first stage. After that repeat this step with making the next file touch stage2.badblocks... run the same code with 2 instead of one. Then do the same for the third stage... swap the numbers out with 3.

    touch stage1.badblocks
    safecopy --stage1 /dev/source /media/otherdrive/stage1.badblocks

    touch stage2.badblocks
    safecopy --stage2 /dev/source /media/otherdrive/stage2.badblocks

    touch stage3.badblocks
    safecopy --stage1 /dev/source /media/otherdrive/stage3.badblocks
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.