RHEL Engineering is moving the tracking of its product development work on RHEL 6 through RHEL 9 to Red Hat Jira (issues.redhat.com). If you're a Red Hat customer, please continue to file support cases via the Red Hat customer portal. If you're not, please head to the "RHEL project" in Red Hat Jira and file new tickets here. Individual Bugzilla bugs in the statuses "NEW", "ASSIGNED", and "POST" are being migrated throughout September 2023. Bugs of Red Hat partners with an assigned Engineering Partner Manager (EPM) are migrated in late September as per pre-agreed dates. Bugs against components "kernel", "kernel-rt", and "kpatch" are only migrated if still in "NEW" or "ASSIGNED". If you cannot log in to RH Jira, please consult article #7032570. That failing, please send an e-mail to the RH Jira admins at rh-issues@redhat.com to troubleshoot your issue as a user management inquiry. The email creates a ServiceNow ticket with Red Hat. Individual Bugzilla bugs that are migrated will be moved to status "CLOSED", resolution "MIGRATED", and set with "MigratedToJIRA" in "Keywords". The link to the successor Jira issue will be found under "Links", have a little "two-footprint" icon next to it, and direct you to the "RHEL project" in Red Hat Jira (issue links are of type "https://issues.redhat.com/browse/RHEL-XXXX", where "X" is a digit). This same link will be available in a blue banner at the top of the page informing you that that bug has been migrated.
Bug 1085562 - dracut is unable to read crypttab if last line does not contain a newline
Summary: dracut is unable to read crypttab if last line does not contain a newline
Alias: None
Product: Red Hat Enterprise Linux 6
Classification: Red Hat
Component: dracut
Version: 6.5
Hardware: All
OS: Linux
Target Milestone: rc
: ---
Assignee: dracut-maint-list
QA Contact: Release Test Team
Depends On:
TreeView+ depends on / blocked
Reported: 2014-04-08 23:05 UTC by Kevin Young
Modified: 2015-08-31 16:48 UTC (History)
9 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Cause: If /etc/crypttab does not contain a newline as the last character, the last line is not parsed by dracut. Consequence: The encrypted disk is not unlocked. Fix: dracut was fixed to handle /etc/crypttab without a newline at the end. Result: The encrypted disk specified in the last line is handled, a password is requested and the disk is unlocked.
Clone Of:
Last Closed: 2015-07-22 06:38:00 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2015:1328 0 normal SHIPPED_LIVE dracut bug fix and enhancement update 2015-07-20 17:53:04 UTC

Description Kevin Young 2014-04-08 23:05:17 UTC
Description of problem:
When booting to an encrypted root volume and the crypttab has been included in the initramfs.img, if the line in the crypttab file does not end in a newline, it is not properly interpreted by dracut. It would be preferable that dracut give a better error message if it cannot read the crypttab file properly. The error during boot looks like this:

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

How reproducible:
Every time.

Steps to Reproduce:
1. Create crypttab file that contains "cryptroot /dev/xvdf /etc/keyfile" (ensure entry in crypttab does not end in a newline)
2. Run dracut, injecting crypttab and keyfile into initramfs.img
3. update grub.conf to boot to encrypted filesystem root=/dev/mapper/cryptroot

Actual results:
dracut: luksOpen /dev/xvdf luks-587e17f6-c6a6-447e-bd9e-e654e7aaedae /etc/keyfile
dracut Warning: No root device "block:/dev/mapper/cryptroot" found

Expected results:
dracut: luksOpen /dev/xvdf cryptroot /etc/keyfile
dracut: Mounted root filesystem /dev/mapper/cryptroot

Additional info:

Comment 1 Adam Williamson 2014-04-17 17:26:13 UTC
This is filed against Fedora Rawhide, but:

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

is this supposed to be for RHEL 6 or Fedora? Thanks!

Comment 5 Alexander Todorov 2015-04-02 11:24:39 UTC
I wasn't able to reproduce with dracut-004-356.el6.noarch and my /etc/crypptab doesn't contain a new line at the end.

can you see if you can reproduce with RHEL 6.6 ?

Comment 8 errata-xmlrpc 2015-07-22 06:38:00 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Comment 9 Kevin Young 2015-08-31 16:48:40 UTC
verified the fix

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