[TriLUG] A question about using dd to restore a corrupt disk image

Maarten Lippmann m.w.lippmann at gmail.com
Fri Apr 13 17:56:12 EDT 2012


Thanks for the helpful responses, I'll forward them.

It makes me wonder what is in that file that was so previous it
warranted e-mailing a complete stranger.

Evil software the likes of which the world has never seen.
The source code to the new Debian Gnu/kWindows build, ready for
installation on a Beowulf cluster
of Raspberry Pi's and guaranteed to explode the heads geeks world wide.
Now we are all complicit.

On Thu, Apr 12, 2012 at 9:08 PM, Andrew Blum <ajblumx at gmail.com> wrote:
> On Thu, Apr 12, 2012 at 7:09 PM, Maarten Lippmann <m.w.lippmann at gmail.com>wrote:
>
>>
>>
>> He was wondering if there was any way of copying the contents of the
>> corrupt copy - everything _except_ the corrupt header into the working
>> copy or the
>> other way round.
>>
>> Simple visualization:
>> Corrupt file:
>> data1_data2_data3_Corruptheader
>>
>> Good older file:
>> data4_data5_data6_Goodheader
>>
>>
>>
> I'm not a storage recovery specialist, but he may want to try the seek
> option built into the dd command:
>
>       seek=BLOCKS
>              skip BLOCKS obs-sized blocks at start of output
>
> Does he know the exact position that separates the data from the header in
> the two files (like sector n and x below) ?
>
> Corrupt file:
> sectodata1_data2_data3_<sector n>Corruptheader
>
> Good older file:
> data4_data5_data6_<sector x>Goodheader
>
> If so, then try something like this (given with 512 Byte block size):
>
> # dd if=<corrupt_file> of=/tmp/file_data bs=512 count=<sector n>
> # dd if=<good_older_file> of=/tmp/file_header bs=512 seek=<sector x>
>
> # cat /tmp/file_header >> /tmp/file_data
>
> --
> Andrew
> --
> This message was sent to: Maarten <m.w.lippmann at gmail.com>
> To unsubscribe, send a blank message to trilug-leave at trilug.org from that address.
> TriLUG mailing list : http://www.trilug.org/mailman/listinfo/trilug
> Unsubscribe or edit options on the web  : http://www.trilug.org/mailman/options/trilug/m.w.lippmann%40gmail.com
> TriLUG FAQ          : http://www.trilug.org/wiki/Frequently_Asked_Questions



-- 
Please avoid sending me Word or PowerPoint attachments.
Use plain text, HTML or PDF (adobe acrobat) instead.
See http://www.gnu.org/philosophy/no-word-attachments.html



More information about the TriLUG mailing list