use CHS from testdisk.log or testdisk output?

How to use TestDisk to recover lost partition
Forum rules
When asking for technical support:
- Search for posts on the same topic before posting a new question.
- Give clear, specific information in the title of your post.
- Include as many details as you can, MOST POSTS WILL GET ONLY ONE OR TWO ANSWERS.
- Post a follow up with a "Thank you" or "This worked!"
- When you learn something, use that knowledge to HELP ANOTHER USER LATER.
Before posting, please read
Posts: 1
Joined: 31 Mar 2014, 18:46

use CHS from testdisk.log or testdisk output?

#1 Post 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 <>

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?

User avatar
Site Admin
Posts: 5427
Joined: 18 Feb 2012, 15:08
Location: Le Perreux Sur Marne, France

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

#2 Post 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...