Page 1 of 1

use CHS from testdisk.log or testdisk output?

Posted: 31 Mar 2014, 19:05
by jodi55
My external USB key has failed mounting and I came across TestDisk. It looks like it might be able to help me but I have some questions.

The USB key is a 32G with 1 FAT partition.


1) For CHS - which is right - testdisk.log or testdisk output?

running testdisk live output shows:

Code: Select all

Disk /mnt/1.img - 31 GB / 29 GiB - CHS 3813 255 63
whereas testdisk.log shows:

Code: Select all

Disk /dev/sdc - 32 GB / 29 GiB - CHS 30592 64 32, sector size=512 - Lexar USB Flash Drive, FW:1100

2) in case it matters, I am running testdisk on an .img file I created using dd:

Code: Select all

dd if=/dev/sdc1 of=/mnt/1.img bs=1M conv=noerror,sync

3) TestDisk Analyse on the .img says:

Code: Select all

TestDisk 6.14, Data Recovery Utility, July 2013
Christophe GRENIER <grenier@cgsecurity.org>
http://www.cgsecurity.org

Disk /mnt/1.img - 31 GB / 29 GiB - CHS 3813 255 63
Current partition structure:
     Partition                  Start        End    Size in sectors


Partition sector doesn't have the endmark 0xAA55
But fdisk on the failed USB shows:

Code: Select all

fdisk -l /dev/sdd

Disk /dev/sdd: 32.1 GB, 32078036992 bytes
256 heads, 50 sectors/track, 4894 cylinders, total 62652416 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x12345678

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *       34976    62652415    31308720    c  W95 FAT32 (LBA)

Would this be because of my use of 'dd' and copying from failed USB to a new USB of same size and that 'dd' was not able to copy the last tiny bit?

Re: use CHS from testdisk.log or testdisk output?

Posted: 02 Apr 2014, 16:39
by cgrenier
You have created an image of the first partition, not of the USB key, so the USB key geometry has no importance.
When you start TestDisk with this disk image, it should default to None for the partition table type, go in Advanced, Boot, List...