We have a hard drive with damaged partitions. In deeper search testdisk found it but wanted to deletd all of the partition (and showed structure OK below):

enter image description here

We tried this one but then it showed the structure is BAD (below):

enter image description here

Another way which we thought was good is choosing all the other partition as delete, except to the last one, and to choose the important partition (the second one) as L and also *-bootable or P(rimary):

enter image description here

We now need to know if that is OK so that we can apply the changes. There is more information if needed in our post on the forums.

It is very important to recover all of our work there.


As we do not know what incident damaged your drive, and we also do not know anything on the previous proper partition structure we unfortunately can not give you a reliable answer to your question.

However in case these lost data are really important, and we have no backups, we strongly recommend to run all the restoring commands on an image of the drive only. Alternatively it would also be a good idea to create an image of the whole drive to be able to restore to the previous state in case we further mess up the partition table. We can do so with

sudo dd if=/dev/sda of=<path>/backup.img

Replace <path> with the location of your backup medium (e.g. an external drive).

Running testdisk on an image will save you a lot of headaches if something goes wrong, and it will also allow you to try out what you believe is right without any risk of further data loss. Run testdisk on the image as follows:

sudo testdisk <path>/backup.img
  • how can i make testdisk to scan the img file (we have a guide to gddrescue). but after creating the file, what should i do? i just dont get it.and what happend was making change in the partitino, but it took long and he shut the pc down. are you sure i can't know if this structure is good or not? – yinon Jun 11 '12 at 10:54
  • thanks! but one thing i still dont know. how i'm recovering my data with the command (i know how ro run it). after i run it, what next? where will our data will be so we'll be able to copy/backup it? thanks again you're helping us a lot! – yinon Jun 11 '12 at 11:43
  • 1
    testdisk will restore the partition table in the image file. Mount it and see if everything is o.k. - how to do this see: askubuntu.com/questions/69363/mount-disk-device-image – Takkat Jun 11 '12 at 11:51
  • thanks! and one more question-can i do it easier with programes like "gmount" or "furius ISO mount"? you're making our day! (i'm trying to learn those phrases (: ) – yinon Jun 11 '12 at 11:56
  • 1
    afaik are these tools for mounting CD-isos only. Here it's much different as we have an image holding several partitions, that's a bit more complicated. – Takkat Jun 11 '12 at 12:20

well i saw this three commands:

testdisk image.dd to create a raw disk image

testdisk image.E01 to recover files from an Encase EWF image

testdisk 'image.???' if the Encase image is split into several files.

which command should i run and how? and what does it do? we really need to know so very very very thanks!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.