drive in the system with the exactly same partition size is
recommended
- <dst_dev> is a file: File must exist but it will be enlarged when
- needed. Commands:
- rm -f /tmp/hdc1.img; touch /tmp/hdc1.img
- are recommended to specify file "/tmp/hdc1.img" for <dst_dev>
+ <dst_dev> is a file: File must exist and it must be at least the size
+ as <src_dev>. If it is larger, the trailing data will remain
+ unchanged. You can create blank file of size 123456789 by:
+ dd if=/dev/zero of=/tmp/outimg bs=1 count=1 seek=$[123456789-1]
+ The size of the original <src_dev> can be queried by:
+ hdparm -g <src_dev>
+ Be aware the size "sectors" is incorrectly the size in bytes,
+ depending on your Linux kernel version. dd(1) command above
+ requires the bytes size (use "bs=512" to use sectors value).
All the numbers are always expressed as sector (that means 512 bytes)
number/count!
is needed). YMMV.
+Linux kernel flaw
+-----------------
+
+Linux kernels have internal blocksize 1KB but the partitions can be sized by
+512 sectors and thus the last odd partition sector gets inaccessible.
+This isn't a problem for a the disk devices as AFAIK all the disks have always
+even number of sectors.
+
+This program is aware of this flaw and it will not report last such sector as
+BAD - just the appropriate warning is supplied (to stderr). This may be visible
+for example while recovering NTFS partition with odd cylinder number (=>odd
+sector count) as NTFS uses the last partition sector for its superblock backup.
+Fortunately CHKDSK will fix it back, of course.
+
+
Compilation
-----------