Bug 466115

Summary: Encrypted logical volumes aren't mounted during boot
Product: Red Hat Enterprise Linux 5 Reporter: Marian Ganisin <mganisin>
Component: initscriptsAssignee: initscripts Maintenance Team <initscripts-maint-list>
Status: CLOSED ERRATA QA Contact: BaseOS QE <qe-baseos-auto>
Severity: high Docs Contact:
Priority: high    
Version: 5.3CC: borgan, harald, notting, syeghiay
Target Milestone: beta   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2009-01-20 22:15:47 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Marian Ganisin 2008-10-08 14:01:44 UTC
Description of problem:
When using lvm and cryptsetup/luks together, init is unable to mount LVM logical volumes if encrypted.
In such case, system system fails to start at all, because block device specified in /etc/fstab doesn't exist.

This is caused by fact, function init_crypto in rc.sysinit is called before lvm initialization and logical volumes are unknown at that moment. In Fedora init_crypto is called two times, additional execution is right after lvm initialization stuff.

Version-Release number of selected component (if applicable):
RHEL5.3-Server-20081006.0

How reproducible:
This issue occurs, if LVM logical volume is encrypted with cryptsetup/luks.

Actual results:
System doesn't boot and init drops to shell asking root for maintenance.


Expected results:
System should boot with all filesystems mounted.

Additional info:

Comment 1 Bill Nottingham 2008-10-08 15:49:37 UTC
So, presumably this works for you?

diff --git a/rc.d/rc.sysinit b/rc.d/rc.sysinit
index 7f28783..0972aed 100755
--- a/rc.d/rc.sysinit
+++ b/rc.d/rc.sysinit
@@ -458,6 +458,14 @@ if [ -c /dev/mapper/control ]; then
 	fi
 fi
 
+if [ -f /etc/crypttab ]; then
+    s=$"Starting disk encryption:"
+    echo "$s"
+    init_crypto 0 && success "$s" || failure "$s"
+    echo
+fi
+
+
 if [ -f /fastboot ] || strstr "$cmdline" fastboot ; then
 	fastboot=yes
 fi

Comment 2 Marian Ganisin 2008-10-09 09:57:03 UTC
Yes, this is the patch, which will fix the issue.

Comment 6 Marian Ganisin 2008-10-22 08:38:18 UTC
Confirmed, system is able to boot with described configuration.
Tested on: RHEL5.3-Server-20081020.1

Comment 10 errata-xmlrpc 2009-01-20 22:15:47 UTC
An advisory has been issued which should help the problem
described in this bug report. This report is therefore being
closed with a resolution of ERRATA. For more information
on therefore solution and/or where to find the updated files,
please follow the link below. You may reopen this bug report
if the solution does not work for you.

http://rhn.redhat.com/errata/RHBA-2009-0245.html