0

My hard disk broke and I am trying to recover all the data I can from the largest of three partitions, but indeed also repair the disk so I can put some less important information in it.

At the moment I have replaced the hard disk for another and I am trying to rescue the broken HDD from a case that lets me connect the disk via USB to my laptop, running Debian 10 buster, at /dev/sdb.

fdisk gives me Input/Output error, as does e2fsck.

Testdisk 7.0 is able to see all the data in the partition I am interested in recovering, and also sees all the partitions, as follows

Disk /dev/sdb - 1000 GB / 931 GiB - CHS 953869 64 32
   Partition                Start            End    Size in sectors
>D Linux                    1   0  1 39771   63 32    81451008
 D Linux                36723   0  1 953868  63 32  1878315008
 D Linux Swap           39773   0  1 47878   63 32    16601088

Structure: Ok.  Use Up/Down Arrow keys to select partition.
Use Left/Right Arrow keys to CHANGE partition characteristics:
*=Primary bootable  P=Primary  L=Logical  E=Extended  D=Deleted
Keys A: add partition, L: load backup, T: change type, P: list files, Enter: to continue

ext4 blocksize=4096 Large_file Sparse_SB Backup_SB, 41 GB / 38 GiB

I am not able to recreate the partition table, the option "Logical" does not appear when using Left/Right arrows. I would like to set the first partition as Primary bootable, the second as Logical and the third is Swap, so I don't know.

Afterward, I plan to use e2fsck and repair it.

Edit: Partitions overlap! That's one big issue. How do I fix an overlapping partition if parted,fdisk, and fsck give Input/Output error?

3
  • How is this a programming-related question?
    – Ken White
    Mar 21, 2020 at 22:43
  • A logical partition needs an extended partition to reside in. If Testdisk can see your data, why not just extract it? Failed disks are not reliable and are not "repairable".
    – kreemoweet
    Mar 23, 2020 at 22:00
  • I can use a non-reliable disk. And I mean repairable in the sense of marking the sectors which are broken and not use them, but you most likely knew that.
    – Astor
    Mar 23, 2020 at 23:28

0

You must log in to answer this question.

Browse other questions tagged .