Bug 466115 - Encrypted logical volumes aren't mounted during boot
Encrypted logical volumes aren't mounted during boot
Status: CLOSED ERRATA
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts (Show other bugs)
5.3
All Linux
high Severity high
: beta
: ---
Assigned To: initscripts Maintenance Team
BaseOS QE
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2008-10-08 10:01 EDT by Marian Ganisin
Modified: 2011-05-29 19:07 EDT (History)
4 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2009-01-20 17:15:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)

  None (edit)
Description Marian Ganisin 2008-10-08 10:01:44 EDT
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 11:49:37 EDT
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 05:57:03 EDT
Yes, this is the patch, which will fix the issue.
Comment 6 Marian Ganisin 2008-10-22 04:38:18 EDT
Confirmed, system is able to boot with described configuration.
Tested on: RHEL5.3-Server-20081020.1
Comment 10 errata-xmlrpc 2009-01-20 17:15:47 EST
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

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