Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
Invalid device error when encrypting with LUKS as per Sakaki
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
Dodec
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2012
Posts: 115

PostPosted: Tue Jun 28, 2016 11:09 pm    Post subject: Invalid device error when encrypting with LUKS as per Sakaki Reply with quote

I'm currently attempting a dual boot with Windows 8.1 and Gentoo as per this guide, but when I attempt to turn my newly created free-space partition into a LUKS volume with
Code:
 gpg --decrypt /tmp/efiboot/luks-key.gpg | cryptsetup --cipher serpent-xts-plain64 --key-size 512 --hash sha512 --key-file - luksFormat /dev/sda6
and then I attempt
Code:
cryptsetup luksDump /dev/sda6
to see if the encryption worked, I get an error saying that /dev/sda6 is not a valid LUKS device (specifically, error code 22, which says as much). Has anybody else run into this problem before with this install method, and if so, how do I fix it?

(Additionally, at one point I attempted to just bypass the encryption step and go on creating the logical volume structure as in the next part of the guide, but I was told that there was an ext4 signature on the partition and that creating the physical volume with
Code:
pvcreate /dev/sda6
would wipe it, and given my previous issues with partitioning (namely, wiping an entire Windows system because I didn't understand how partitions worked :oops: ), I decided against that. Honestly, if that won't break anything and it would be easier than fixing the encryption, I'd probably be fine with that option as well, even though I won't wind up with an encrypted system.)

[Moderator edit: added url closing tag so that link to Wiki is clickable.]
Back to top
View user's profile Send private message
jonathan183
Guru
Guru


Joined: 13 Dec 2011
Posts: 318

PostPosted: Tue Jun 28, 2016 11:24 pm    Post subject: Reply with quote

Have you done
Code:
export GPG_TTY=$(tty)
Back to top
View user's profile Send private message
Dodec
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2012
Posts: 115

PostPosted: Wed Jun 29, 2016 12:29 am    Post subject: Reply with quote

Yes, I did run that as per the instructions in the guide I linked to, but the encryption still didn't work.

Additionally, the way the decryption pipes to the keyfile argument makes it so that the passphrase prompt for the decryption obscures any sort of error messages that might pop up in the course of the process. All I get for an end result is
Code:
gpg: encrypted with 1 passphrase
.
Back to top
View user's profile Send private message
Dodec
Tux's lil' helper
Tux's lil' helper


Joined: 09 Jul 2012
Posts: 115

PostPosted: Wed Jun 29, 2016 2:34 am    Post subject: [solved] Reply with quote

I asked around about this on the #gentoo irc channel, and thanks to wraeth's help, I found out that the problem was actually with the keyfile not wanting to be decrypted (maybe there was a typo when I originally made the passphrase?), rather than LUKS itself. I deleted the keyfile, replaced it with another random one created in the same manner, and everything worked just fine.

tl;dr: GPG works in mysterious ways.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing 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