Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
unable to open dm-crypt/Luks disk - SOLVED
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo
View previous topic :: View next topic  
Author Message
vfan
n00b
n00b


Joined: 26 Aug 2009
Posts: 8

PostPosted: Mon Nov 21, 2022 3:00 pm    Post subject: unable to open dm-crypt/Luks disk - SOLVED Reply with quote

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.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Other Things Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum