Don’t use dd to put the image back, as doing so will probably destroy the physical drive.
??
Why would that?
(Thanks for the warning anyway)
It’s the same story as defragmenting SSDs; you also shouldn’t do that.
Thing is: when an SSD writes, it doesn’t always write on the position it tells you where it writes.
Resetting a bit on a SSD is slooooow, so the SSD just puts your backup somewhere else on the disk - if it has the room for it - and lies about the location of the data. The disk is now full and will become incredibly slow when writing, because everything new - lets face it, something as simply as starting your OS produces a write - needs to be put somewhere where there’s already stuff, which needs to be cleared first… and that requires considerable more work from your SSD. Don’t be amazed if putting back your image will take days and afterwards launching the OS on the disk will take forever.
If you need the Bitlocker recovery key, you might be able to get the key from the MS account.
I had to do this once and it worked.
“Read the BitLocker key from the Microsoft account To do so, visit https://account.microsoft.com/devices/recoverykey. After signing in with the Microsoft account you used, a list with the keys appears. You can also delete them from here, if necessary.”
I see it adds wear, but really destroys?
When I changed my 256GB SSD in my desktop to an 512GB one, I dd-ed the original, then resotred the image to the new one. Then I just resized my partitions to take advantage of the bigger capacity. Nothing wrong happened…
We had that, I don’t know from where, but don’t really care
At the end: SUCCESS!
It would have been easy, if the filesystem weren’t severly damaged.
I confirmed, that Windows startup-repair failed.
The I tried to boot my Ventoy, but failed, something was mentioned about “shim data…” for a fraction of a second, then the laptop switched itself off.
So first I had to disable secure boot, after that I could boot basically anything.
My first attempt was to do what the article linked by @nevj told.
The dislocker part worked, the mount did not, because the filesystem was damaged.
Anyway, Photorec saved quite a few files still from the damaged filesystem.
I did not have the courage to do any write operation until I don’t have a backup of the image of the disk.
After that I tried to do ntfsfix, but it failed (of course on the decrypted loop device).
So I restarted and, went to startup repair again.
Here I had to enter the recovery key at least 3 times, phew…
After all, I got the command prompt in “special repair” options, where I could run chkdsk c: /f
which did a huge lot of corrections.
Windows startup repair failed again, so I decided to leave it alone.
Booted Debian again, this time both “dislock” and mount worked like a charm.
I copied the Users dir from broken Windows drive as a whole, plus another directory, which didn’t seem like a standard folder on a Windows install.
Data saved, problem solved.
Windows has to be reinstalled there, but that will not be my job.
I repeatedly emphasized the importance of having a backup, and possibly avoid bitloccker next time.
I don’t know, if my words had an effect.
Anyway, this was an interesting adventure.
You all helped me with some hints and warnings, for which I cannot say enough
THANK YOU!
I mark @nevj answer as solution, because that Baeldung link provided me th most help.
Very important. Maybe a lot of users either don’t know how to make a backup or don’t care until their data is gone. Maybe even some people don’t know about backups.
Today a HDD of mine bit the dust (died). Did it have data on it, YES.
Did I lose data? No. The disk that failed was a backup disk.
I have 3 disks for my data. A main one plus 2 backups.