Thursday, May 2, 2024
0
rated 0 times [  0] [ 0]  / answers: 1 / hits: 2579  / 3 Years ago, thu, may 27, 2021, 6:19:45

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.


More From » partitioning

 Answers
2

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

[#37713] Thursday, May 27, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
learty

Total Points: 432
Total Questions: 115
Total Answers: 109

Location: Wallis and Futuna
Member since Tue, Mar 30, 2021
3 Years ago
learty questions
Sat, May 21, 22, 15:30, 2 Years ago
Sun, Jan 9, 22, 22:31, 2 Years ago
Mon, Jul 4, 22, 11:31, 2 Years ago
Tue, Mar 22, 22, 16:28, 2 Years ago
;