Re: Restored luks2 header to wrong drive!

Michael Kjörling <michael-/[email protected]>
Newsgroups gmane.linux.kernel.device-mapper.dm-crypt
Message-ID <28961df3-d011-4f49-850b-be125f2a6d81@localhost>
On 4 May 2020 23:07 -0400, from [email protected] (Default User):
> Immediately realizing what I had done, I used the Gnome "Disks" utility to
> unmount, "lock" and power off both USBSD003 and USBHD005. And then rebooted.

Sorry, but that -- especially the reboot -- was a mistake. Had you not
done that, it's possible that file system metadata would still have
been in RAM, and could perhaps have been at least partially recovered
that way. Once you rebooted, that door was closed.


> Is there a way I can recover my data from USBHD005?

First off, _forget about LUKS_ being involved here. What has really
happened is that you've overwritten the first few and the last few
megabytes of the partition. A partition which was previously formatted
as unencrypted ext4fs. (It would have been a very different matter if
it had been LUKS encrypted, in which case the answer unfortunately
almost certainly would have been that absent a header backup, your
data is irrecoverable. But that's not the situation you're in.) So
don't focus on _what_ you've overwritten that portion of the partition
with; look at ext4fs filesystem metadata overwrite recovery techniques
instead. (Which is off topic on this list.)

As long as you don't write _anything_ further to that drive, you have
a decent chance of getting most of your data back. Since the drive
itself still appears to be fully functional, even professional data
recovery services shouldn't be prohibitively expensive for the
purpose, were you to choose to go that route.

If you're serious about attempting data recovery, you really should
get yourself into a position where you can image the entire partition,
so that you can work on the image and let the current drive sit
_physically unplugged_ for the duration. A 2TB external USB HDD can
probably be had for $100-$150 or the local equivalent in, at least
most parts of, the Western world. And look at it this way: once you're
done, having that drive will allow you to have a second copy of this
highly important data.

-- 
Michael Kjörling • https://michael.kjorling.se • [email protected]
 “Remember when, on the Internet, nobody cared that you were a dog?”

_______________________________________________
dm-crypt mailing list
[email protected]
https://www.saout.de/mailman/listinfo/dm-crypt
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.