Am Sat, 15 Dec 2018 18:33:35 -0500 schrieb Jack <ostrof...@users.sourceforge.net>:
> Some months ago, I borked a laptop HDD by trying to move a partition > in a way that left both the old and new partitions invalid. (For my > sanity, I've forced the details out of my memory, but the old and > new locations overlapped, and I think the move might have been > interrupted. My own fault, I know.) Have you written anything on this HDD after moving those partitions? And did you move the partitions or did you repartition the HDD? You could try to find the beginning of the old partitions with hexedit and set a pointer to this position with losetup. Set the offset to this position. Linux actually doesn't need partitions to access the HDD and/or mount file systems. Partitions just make it a lot easier. And keep in mind that partitions are written to the partition table at the beginning of the drive. Repartitioning usually doesn't overwrite any data. So if you haven't written anything onto the new partitions (incl. formatting the new partitions) all the data is most likely still there. So you could also try to recover your old partition table. Maybe the backup of your old super block is still intact. Unfortunately I can't remember how to find it out. Maybe with fdisk resp. gdisk or with testdisk. But there is a chance that the behavior of moving partitions is a bit different than repartitioning the HDD, so that the data is actually already overwritten by moving those partitions. On the other hand, if you had really moved the partitions the partitioning tool you used should have seen that both partitions would overlap and shouldn't have done this. That said, no matter which problem you have with an HDD, always stay calm and think first before you do anything. In most cases you can recover your data. But the first step is to stop working (particularly writing) with this HDD. The second step is - as the others already mentioned - to make a copy with dd or ddrescue. I had a lot of HDD crashes, logical and physical ones. And once I even didn't have a backup. I never lost any data so far, not even a bit. Heiko