You are not logged in.

#1 2013-10-08 10:14:39

NeanderMarcl
Member
Registered: 2013-06-04
Posts: 74

[LUKS] Multiple devices crypdevices

Hi,

I've got two disks and I've created a LVM with these disks and merge them in a two crypdevices.
here's the scheme

/dev/sda1 -> LVM -> LUKS sda1_c -> MOUNTPOINT /home
/dev/sdb1 -> BOOT -> MOUNTPOINT /boot
/dev/sdb2 -> LVM -> LUKS sdb2_c -> MOUNTPOINT /dev/mapper/cr-home /dev/mapper/cr-swap /dev/mapper/cr-root

(I read this post https://bbs.archlinux.org/viewtopic.php?pid=827495, we've to separate the cryptdevice by coma.

APPEND root=/dev/mapper/cr-root cryptdevice=/dev/sda1:sda1_c,/dev/sdb2:sdb2_c  ro

During the boot, I enter passphrase

Encryption option sda1_c not known, ignoring

Last edited by NeanderMarcl (2013-10-08 11:34:15)

Offline

#2 2013-10-08 13:09:55

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

Re: [LUKS] Multiple devices crypdevices

The post you link to also explicitly mentions that the user modified the hook in order to support multiple devices.

Offline

#3 2013-10-08 15:27:18

NeanderMarcl
Member
Registered: 2013-06-04
Posts: 74

Re: [LUKS] Multiple devices crypdevices

I replace /lib/hooks/initcpio/encrypt by the file in pastebin make a mkinitpio -p linux.
The reboot failed, nothig respond I have to use DVD repair.
Is there any other solutions ?

Last edited by NeanderMarcl (2013-10-08 15:28:43)

Offline

#4 2013-10-08 16:37:06

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

Re: [LUKS] Multiple devices crypdevices

Sure, you can understand the code rather than blindly dropping it into your initramfs.

I don't really see why you need to decrypt both devices in the initramfs. According to your scheme, you only need to unlock "sdb2_c" in early userspace.

Offline

#5 2013-10-08 16:49:29

NeanderMarcl
Member
Registered: 2013-06-04
Posts: 74

Re: [LUKS] Multiple devices crypdevices

I want a bigger home I've to small HDD, the LVM makes me a "big" home.
It's not the good method to proceed ?

Last edited by NeanderMarcl (2013-10-08 16:57:41)

Offline

#6 2013-10-08 17:31:39

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

Re: [LUKS] Multiple devices crypdevices

Again, you do not need to unlock both volumes in early userspace.

Offline

#7 2013-10-08 17:32:40

NeanderMarcl
Member
Registered: 2013-06-04
Posts: 74

Re: [LUKS] Multiple devices crypdevices

In other words?

Offline

#8 2013-10-08 17:38:02

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

Re: [LUKS] Multiple devices crypdevices

In other words.... use /etc/crypttab for unlocking the other volume and let systemd take care of it?

Last edited by falconindy (2013-10-08 17:38:11)

Offline

#9 2013-10-08 18:01:55

NeanderMarcl
Member
Registered: 2013-06-04
Posts: 74

Re: [LUKS] Multiple devices crypdevices

Yeah, thanks for advices.

Offline

Board footer

Powered by FluxBB