Bug 466115 - Encrypted logical volumes aren't mounted during boot
Encrypted logical volumes aren't mounted during boot
Product: Red Hat Enterprise Linux 5
Classification: Red Hat
Component: initscripts (Show other bugs)
All Linux
high Severity high
: beta
: ---
Assigned To: initscripts Maintenance Team
Depends On:
  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:
Last Closed: 2009-01-20 17:15:47 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2009:0245 normal SHIPPED_LIVE initscripts bug fix update 2009-01-20 11:06:46 EST

  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):

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
+if [ -f /etc/crypttab ]; then
+    s=$"Starting disk encryption:"
+    echo "$s"
+    init_crypto 0 && success "$s" || failure "$s"
+    echo
 if [ -f /fastboot ] || strstr "$cmdline" fastboot ; then
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.


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