Bug 893222 - RFE: rd.luks.key argument does not allow for multiple keys
Summary: RFE: rd.luks.key argument does not allow for multiple keys
Keywords:
Status: NEW
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: rawhide
Hardware: x86_64
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: dracut-maint
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2013-01-08 23:21 UTC by Carl Roth
Modified: 2014-12-11 21:00 UTC (History)
6 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed:
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Carl Roth 2013-01-08 23:21:47 UTC
Description of problem:

Documentation for rd.luks.key at
http://www.kernel.org/pub/linux/utils/boot/dracut/dracut.html
seems to indicate that it's possible to unlock multiple LUKS devices at boot time with a different key for each device.  In practice this does not work.  The only configuration I found that works with multiple LUKS devices is to use a single key that is shared for all devices.  If I specify multiple keys at boot time, *none* of them work and none of the devices are unlocked.

Version-Release number of selected component (if applicable):

dracut-018-105.git20120927.fc17.noarch
plymouth-0.8.5-0.2012.04.27.4.fc17.x86_64

How reproducible:

Always

Steps to Reproduce:

[steps here are for a VM]
1. Create two LVs and configure and format them for LUKS.
2. extract out both LUKS UUIDs with 'cryptsetup luksUUID'
3. Create and format a vfat LV with a well-known label (e.g. KEYCHAIN)
4. create two random key files on the vfat partion
5. add one keyfile as a key for the first LUKS partition, add the other keyfile as a key for the second LUKS partition
6. attach all three LVs to the VM
7. adjust the boot options on the VM

   - remove 'rd.luks=0'
   - add 'rd.luks.crypttab=0'
   - add 'rd.lvm.lv=VG/CRYPT-LV-1 rd.lvm.lv=VG/CRYPT-LV-2'
   - add 'rd.luks.uuid=CRYPT-UUID-1 rd.luks.uuid=CRYPT-UUID-2'
   - add 'rd.luks.key=/key-file-1:LABEL=KEYCHAIN:UUID=CRYPT-UUID-1'
   - add 'rd.luks.key=/key-file-2:LABEL=KEYCHAIN:UUID=CRYPT-UUID-2'

8. regenerate grub.cfg if necessary
9. reboot

Actual results:

The system recognizes the keychain device, but is not able to unlock any of the LUKS partitions.  It tried multiple times, but eventually gives up and asks for the keys interactively.

Expected results:

LUKS devices should be individually unlockable.

Additional info:

If I create a single, shared key and add it to each LUKS device then the automated unlocking works.


Note You need to log in before you can comment on or make changes to this bug.