Article 55VGS Work HDD suddenly lost key for unlocking dmcrypt.

Work HDD suddenly lost key for unlocking dmcrypt.

by
hscast
from LinuxQuestions.org on (#55VGS)
My problem started with my backup hdd taking a 4 foot drop to a hard floor. As expected when I powered it up it made the familiar screeching sound. My work drive is 8 TB and the backup was about 4 TB. I bought a new 10 TB drive to use as my backup drive. I went to do what I have done in the past for many years of using dd to clone the work drive onto the new backup. The way I usually configure my drives is to have just /boot in a separate non-encrypted partition and then the rest of the drive is encrypted. When I clone drives I usually do it to a raw device, using dd if=/dev/sda of=/dev/sdb. I have done it this way many times in the past and it worked fine I was able to run the system(s) on either drive with no difference. I went ahead and started it without bothering with enveloping the dd command in a command that would show the progress I just wanted to get started as I knew it was going to take a long time with a total of about 7TB.(I also was running Fedora 32 from DVD to do it)

After about 2.5 days it seemed like it was hung on a loop and wasn't working anymore so I aborted. I then checked the cloned drive and saw that it had the 1MB boot partition as well as a 1.5GB /boot partition and a ~8TB encrypted partition and ~ 2TB unused. I then tried booting from the cloned drive and it came up fine with the same passphrase as the source drive. I was able to play music from my media files in /pub fine as well as start a movie that was on it.I then ran an update on it and rebooted. It failed to reboot due to failing fsck on /pub. So I rebooted to the original drive which worked did the same update and rebooted with no problems. I then shut down the system disconnected the data cable to the original drive, and just having the cloned drive connected. I did not disconnect the power from original drive as I would have had to tear apart the system to get at it. I booted up the cloned drive and manually ran fsck on /pub which took almost 2 days. I essentially had very little in /pub that was usable. So I figured that I would boot up from the original drive with the cloned hooked up and just copy all files manually by script. The problem was that when I powered down, reconnected everything and booted from the original drive it erred out after I entered the passphrase stating something to the effect that the key was gone. I think that my leaving the power connected to drive caused the drive to corrupt the dmcrypt header on bootup. Since the new drive is cloned from the original drive should I be able to do a header backup from the new drive and restore it on the original drive to fix the problem?latest?d=yIl2AUoC8zA latest?i=mgRrGGPyNEk:G8vDDxEX2I0:F7zBnMy latest?i=mgRrGGPyNEk:G8vDDxEX2I0:V_sGLiP latest?d=qj6IDK7rITs latest?i=mgRrGGPyNEk:G8vDDxEX2I0:gIN9vFwmgRrGGPyNEk
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments