bug-ddrescue
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Bug-ddrescue] About converting partition log to disk log


From: Joe Kickman
Subject: [Bug-ddrescue] About converting partition log to disk log
Date: Sat, 5 Nov 2016 20:42:30 +0300

Thanks, Scott Dwyer!!! Superb!
The first part I've done myself, I first created the whole disk image, then 
copied the partition image to the disk image, specified at first to copy only 1 
sector at the partition start to check whether the parameter -o was set 
correctly. It really was! [ -s1s -o206848s ]. Then I omitted -s - and specified 
the partition_copy_log as a domain file - to copy only the rescued parts of the 
image [ -m ~/usbdrive/clone1.log ].
The second part I did manually. Luckily - there were only about 80 lines to 
correct. I added +06500000 to each block_start_position, then added a line 
before all existent positions: 00000000  06500000 ?
Then ddrescueview showed me the maps - partition and disk - by their logfiles - 
and I became sure I did it right!
Then I copied only the MBR, then filled it with zeros on the initial disk 
(using free version of DMDE disk editor) - and then ddrescue was run on the 
whole disk. It works fine. I am using -R -c1 to be sure to copy without 
freezes. Also sometimes it occured useful to disable drive cache with hdparm [ 
sudo hdparm -A 0 /dev/sdb ] and [ sudo hdparm -a 0 /dev/sdb ]. It helps to read 
carefully when being near the problematic areas.
Does the direct mode work in the same way?
Also, I propose to add an option to ddrescue to make decimal output - to be 
easier to process the logfile-mapfile with spreadsheets.
By the way, Scott, which one did you use? I considered using spreadsheet 
programs - but do not know any capable of understanding hex numbers :(.
Also, I considered using fill-mode and then generate-mode to automate the 
process, but, luckily, the log was small enough to be processed manually.

>> Here is the logfile of the partition_to_image rescue
>> The partition /dev/sdb2 starts at sector 206848.
> Assuming you are correct about the partition starting sector, here is 
> how to change this to a whole drive recovery. First, you will need 
> enough space on the target drive for a copy of the image file. Assuming 
> the source drive is only 160GB, hopefully your USB drive has at least 
> that much and a little more current free space. Now you need to make a 
> copy of the image file with an offset of 105906176 (206848 * 512), which 
> is the number of bytes of the sector start. The following ddrescue 
> command should do that:
>>  ddrescue ~/usbdrive/clone1.img ~/usbdrive/clonefull.img -o 105906176
> 
> Next is the hard part. The whole log needs to have the position shifted 
> by the new offset. This is best done with a spreadsheet, although it can 
> be tricky to get a typical spreadsheet program to accept hex for input, 
> it can be done. The nice thing about ddrescue is that it can accept 
> decimal numbers in the log so the spreadsheet does not need to convert 
> back to hex.

_____________________
Thanks!
"Joe Kickman" (my nickname)

reply via email to

[Prev in Thread] Current Thread [Next in Thread]