You are not logged in.

#1 2012-12-19 10:56:12

doupod
Member
Registered: 2012-09-06
Posts: 73

[Cryptsetup and encrypt hook] Can't boot ? [Solved]

Hi,

I've an encrypted system (LVM on LUKS) and I've two encrypted partitions to mount at startup (root and home).

I used to use cryptsetup-multi from AUR but it doesn't work anymore (it doesn't even seam to run because there's absolutely no output and no errors at the startup). If I use cryptsetup, everything work great but I can't mount both partitions. I use a keyfile on a vfat usb disk.

I think that may be due to a recent update (perhaps the block hook ?) as I've just reinstalled it but it was working fine two weeks ago (Arch up to date at this time).

Thanks

Last edited by doupod (2012-12-20 20:22:08)

Offline

#2 2012-12-19 11:05:02

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Cryptsetup and encrypt hook] Can't boot ? [Solved]

Because the hook itself is broken with changes in syntax for 0.12.0. It's a shame the author decided that it was worthwhile to repackage all of cryptsetup (which is, not to mention, out of date) when all they needed to do was provide a slightly modified pair of hooks for mkinitcpio.

Offline

#3 2012-12-19 11:22:08

doupod
Member
Registered: 2012-09-06
Posts: 73

Re: [Cryptsetup and encrypt hook] Can't boot ? [Solved]

Ok.

So, two questions :
- First, how can I handle this two partitions encryption scheme ? I could manually modify the cryptsetup hook to make it corresponds with my needs. But has it already been done ? smile
- Second, why is cryptsetup out of date ? I followed the dm-crypt with LUKS article on the wiki.

Thanks

Offline

#4 2012-12-19 12:56:14

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Cryptsetup and encrypt hook] Can't boot ? [Solved]

doupod wrote:

Ok.

So, two questions :
- First, how can I handle this two partitions encryption scheme ? I could manually modify the cryptsetup hook to make it corresponds with my needs. But has it already been done ? smile

install core/cryptsetup and copy over encrypt_install from the AUR package to /lib/initcpio/install/encrypt

doupod wrote:

- Second, why is cryptsetup out of date ? I followed the dm-crypt with LUKS article on the wiki.

Uh, compare the versions between core/cryptsetup and the cryptsetup-multi package in the AUR?

Offline

#5 2012-12-19 22:16:18

doupod
Member
Registered: 2012-09-06
Posts: 73

Re: [Cryptsetup and encrypt hook] Can't boot ? [Solved]

Ok. I'll test this solution.

I thought you said core/cryptsetup was out of date and not AUR/cryptsetup-multi... hmm

Thanks

EDIT : I'm not sure I got what you explained about encrypt_install.

I downloaded the tarball for cryptsetup-multi from AUR and moved the file encrypt_install to /lib/initcpio/install/encrypt (I replaced the previous file, after having copied it). Then I ran "mkinitcpio -p linux" and restarted my computer but it seems it didn't change anything. My linux line in grub.cfg is still the same as the one I had for cryptsetup-multi (with cryptdevice=/dev/sda2:sda2,/dev/sdb1:sdb1 and cryptkey).

When I start my computer, I can see the udev hook being run (I deleted the quiet option) and immediately after, the lvm2 hook. But nothing happens with encrypt (no error and no indications. If I switch back to the /lib/initcpio/install/encrypt provided by core/cryptsetup, it works but I can't mount two encrypted partitions.

Last edited by doupod (2012-12-19 22:32:55)

Offline

#6 2012-12-19 23:54:45

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Cryptsetup and encrypt hook] Can't boot ? [Solved]

Sorry, not sure why I mentioned encrypt_install -- that's actually the brokenness. You need to copy encrypt_hook to /lib/initcpio/hooks/encrypt.

Offline

#7 2012-12-20 20:21:55

doupod
Member
Registered: 2012-09-06
Posts: 73

Re: [Cryptsetup and encrypt hook] Can't boot ? [Solved]

Thanks, it works !

Problem solved.

Where can I find any documentation about the initcpio process and the way it handles hooks ?

Offline

#8 2012-12-21 03:55:14

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: [Cryptsetup and encrypt hook] Can't boot ? [Solved]

mkinitcpio's manpage documents hook API . there's plenty of examples available.

Offline

#9 2012-12-22 11:58:43

doupod
Member
Registered: 2012-09-06
Posts: 73

Re: [Cryptsetup and encrypt hook] Can't boot ? [Solved]

Ok, I'll read it.

Thanks

Offline

Board footer

Powered by FluxBB