vfan n00b
Joined: 26 Aug 2009 Posts: 8
|
Posted: Mon Nov 21, 2022 3:00 pm Post subject: unable to open dm-crypt/Luks disk - SOLVED |
|
|
My laptop was built many years ago with whole disk encryption and uses a key file. The boot device is a USB stick. I decided to make a copy of the disk using dd command. I booted from a gentoo minimal build CD and ran the dd command.
When the command was finished I rebooted but the boot failed after entering the passphrase.
I booted from the CD again and tried cryptsetup.
modprobe dm-crypt
cryptsetup luksOpen /dev/sdb1 system
It fails with
No key available with this passphrase
I have also tried to specify the key file with a -d option. I have also tried the disk I id'd to with the same results
I had another USB stick with grub v1 config. I copied the key file from it to the usual boot stick and that did not make a difference.
The key file is a gpg file and I can run gpg --decrypt on it and it accepts the passphrase.
Does anyone know why a dd would affect the source disk and anything I could try to open the disks
The problem was the source disk was /dev/sdb and the destination /dev/sda. The dd created sda with the same UUID. I am assuming that cryptsetup uses the UUID, even though I specify /dev/sdb1, and tries to open sda1. I took sda out of the laptop and it booted. I put it back in and used fdisk to delete sda1 and it still boot. |
|