# USB Disk corrupted and TestDisk problems

## jlpoole

I have a Seagate 1.5 TB attached to my SheevaPlug through USB.  I have /var and /usr mapped to the drive, the rest of the operating system is on the USB stick memory.  This set up been working like a champ for about six months.  Last night I found problems and I'm stuck.

Please help.

After witnessing the system being nonresponsive, I booted up my SheevaPlug using  TFTP and a busy box, then tried to mount the problem drive.  I couldn't mount it.  I have another twin drive which mounted fine.

I moved the problem drive over to another Gentoo box and ran TestDisk.  The first time, Test Disk gave me this:

```
TestDisk 6.8, Data Recovery Utility, August 2007

Christophe GRENIER <grenier@cgsecurity.org>

http://www.cgsecurity.org

Disk /dev/sdb - 1500 GB / 1397 GiB - CHS 182401 255 63

     Partition               Start        End    Size in sectors

<empty lines snipped>

Structure: Ok.

Keys A: add partition, L: load backup, Enter: to continue
```

I then continued (didn't try a deep read) and returned to the main menu -- I did not want to do anything that would cause a write to the disk. 

I then tried to learn more at TestDisk at their site to see if the condition I had, namely no partition showing with a "Structure: Ok." status, was documented on what to do next.  Finding nothing matching my scenario, I then attempted another "Analyse" and it proceeded along, occasionally taking a second or two on a particular block (the Seagate drive is one of the Green drives that powers down when not in use, it seemed to be in an in-between mode: the light would slowly brighten and then fade).  On the second attempt, TestDisk stopped at the 49% mark; I tried control-C and is did nothing until finally the main TestDrive menu reappeared in the console.

Here's fdisk (sdc is the drive in question):

```
hermes ~ # fdisk -l

Disk /dev/sda: 1000.2 GB, 1000203804160 bytes

255 heads, 63 sectors/track, 121601 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x4d4acd08

   Device Boot      Start         End      Blocks   Id  System

/dev/sda1   *           1           5       40131   83  Linux

/dev/sda2               6          68      506047+  82  Linux swap / Solaris

/dev/sda3              69      121601   976213822+  83  Linux

Disk /dev/sdc: 1500.3 GB, 1500301910016 bytes

255 heads, 63 sectors/track, 182401 cylinders

Units = cylinders of 16065 * 512 = 8225280 bytes

Disk identifier: 0x00000000

Disk /dev/sdc doesn't contain a valid partition table

hermes ~ #

```

Here's geometry:

```
TestDisk 6.8, Data Recovery Utility, August 2007

Christophe GRENIER <grenier@cgsecurity.org>

http://www.cgsecurity.org

Disk /dev/sdc - 1500 GB / 1397 GiB - CHS 182401 255 63, sector size=512

Because these numbers change the way that TestDisk looks for partitions

and calculates their sizes, it's important to have the correct disk geometry.

PC partitioning programs often make partitions end on cylinder boundaries.

A partition's CHS values are based on disk translations which make them

different than its physical geometry. The most common CHS head values

are: 255, 240 and sometimes 16.

[ Cylinders ]  [   Heads   ]  [  Sectors  ]  [Sector Size]  [    Ok     ]

```

If I try "Advanced" option, I get:

```
TestDisk 6.8, Data Recovery Utility, August 2007

Christophe GRENIER <grenier@cgsecurity.org>

http://www.cgsecurity.org

Disk /dev/sdc - 1500 GB / 1397 GiB - CHS 182401 255 63

No partition available.

<empty lines snipped>

[  Quit  ]

                              Return to main menu

```

Of utmost importance are some data files created in the last 36 hours, recovering them is paramount.

I had created one partition on this disk and formatted it with ext3.

What recommendations do people have?  Is it a good sign that TestDisk was able to completely scan and report "Structure ok" suggesting the data sectors are ok and it's a hardware read issue?  Is there other software that can help me repair/restore/retrieve?

Lastly, is this a case where I just create a new partition and the data sectors remain unaffected? (I hope so.)

----------

## jlpoole

I should add, when I first attempt "Analyse" with TestDisk, I get the following:

```
TestDisk 6.8, Data Recovery Utility, August 2007

Christophe GRENIER <grenier@cgsecurity.org>

http://www.cgsecurity.org

TestDisk 6.8, Data Recovery Utility, August 2007

Christophe GRENIER <grenier@cgsecurity.org>

http://www.cgsecurity.org

Disk /dev/sdc - 1500 GB / 1397 GiB - CHS 182401 255 63

Current partition structure:

     Partition                  Start        End    Size in sectors

Partition sector doesn't have the endmark 0xAA55

<blank lines snipped>

*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted

[Proceed ]

               
```

----------

