Bug 530411 - Ask for LUKS password only on root device
Summary: Ask for LUKS password only on root device
Keywords:
Status: CLOSED DUPLICATE of bug 530898
Alias: None
Product: Fedora
Classification: Fedora
Component: dracut
Version: rawhide
Hardware: All
OS: Linux
low
medium
Target Milestone: ---
Assignee: Harald Hoyer
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2009-10-22 17:07 UTC by Michael Monreal
Modified: 2009-11-05 12:25 UTC (History)
12 users (show)

Fixed In Version:
Doc Type: Enhancement
Doc Text:
Clone Of:
Environment:
Last Closed: 2009-11-05 12:25:28 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description Michael Monreal 2009-10-22 17:07:29 UTC
During boot I *sometimes* get asked to the password to my LUKS partitions. I did not set up anything (I don't want to be asked at boot) but the main problem is that this does not happen during every boot.

I have booted without splash and the password was asked before other filesystems were mounted (before the "press I for interactive mode" part) so I don't really understand what exactly could want to mount LUKS at that point...

Comment 1 Milan Broz 2009-10-23 12:19:11 UTC
Yes, I see this too - dracut seems to ask for every device which it detects as LUKS device...
I have for example /dev/sda3 as testing partition (not in crypttab, no fs there) and it asks for password during boot.

Not a cryptsetup problem, reassigning to dracut.

Comment 2 Harald Hoyer 2009-10-23 12:29:00 UTC
Add "rd_NO_LUKS" to the kernel command line, if you don't want to be asked.

Comment 3 Milan Broz 2009-10-23 12:39:21 UTC
And how it will open e.g. encrypted root then?

Comment 4 Daniel Mach 2009-10-23 12:45:06 UTC
I think it should open just encrypted root and volumes listed in crypttab and do not touch anything else.
Imagine having several encrypted roots, it doesn't make sense to open more than the one you currently boot from.

Comment 5 Michael Monreal 2009-10-23 12:50:33 UTC
The other question would be, why does it not ask every time? It only asks randomly...

Anyway, I have set up cryptab to not bug me at boot but dracut does not respect this setting, having to configure this twice is not really nice.

Comment 6 Michael Monreal 2009-10-23 12:59:30 UTC
(In reply to comment #2)
> Add "rd_NO_LUKS" to the kernel command line, if you don't want to be asked.  

How can I tell the system to always add this automatically, eg after updating a kernel?

Comment 7 Milan Broz 2009-10-23 13:09:24 UTC
Dracut should not open even devices in crypttab, only root and other devices required to boot.
Iniscripts can open it later during boot.

(Otherwise fresh copy of crypttab have to be present in initrd because it can be on encrypted disk itself.)

Comment 8 Milan Broz 2009-10-23 13:19:18 UTC
Also see bug 524366.

Why the dracut should open completely boot-unrelated encrypted devices?

If you create new LUKS device on unecrypted system remotely and issue reboot
why it should try to open that device?

So the system will no longer boot automatically because of waiting for passphrase in boot prompt?

Comment 9 Harald Hoyer 2009-10-23 13:42:07 UTC
you can restrict dracut .. just add the parameters, which are output by

$ sudo dracut-gencmdline 
rd_DM_UUID=isw_bfadchbffa_Volume0 rd_LVM_VG=VolGroup00 rd_LUKS_UUID=luks-d1b7e28f-bbdf-4e27-a51f-e61c0b56bbc6

This was my first intention for /sbin/new-kernel-pkg to pickup those parameters, though auto-assembly was favored.

Comment 10 Harald Hoyer 2009-10-23 13:42:55 UTC
this is more like a basic discussion about "auto assembly" vs. "controlled assembly"

Comment 11 Harald Hoyer 2009-10-23 13:45:30 UTC
(In reply to comment #6)
> (In reply to comment #2)
> > Add "rd_NO_LUKS" to the kernel command line, if you don't want to be asked.  
> 
> How can I tell the system to always add this automatically, eg after updating a
> kernel?  

custom kernel parameters are always copied from the running kernel, so if you specify it, it should be copied to your next kernel entry in grub.conf.

Comment 12 Harald Hoyer 2009-10-23 13:48:20 UTC
(In reply to comment #8)
> Also see bug 524366.
> 
> Why the dracut should open completely boot-unrelated encrypted devices?

because it does not know the sequence how to find root in auto mode.

> 
> If you create new LUKS device on unecrypted system remotely and issue reboot
> why it should try to open that device?

because it does not know the sequence how to find root in auto mode.

> 
> So the system will no longer boot automatically because of waiting for
> passphrase in boot prompt?  

hmm, true, that is a valid reason!

Comment 13 Harald Hoyer 2009-11-05 12:25:28 UTC

*** This bug has been marked as a duplicate of bug 530898 ***


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