Bug 434656

Summary: mkinitrd doesn't recognize encrypted swap given as "/dev/mapper/swap"
Product: [Fedora] Fedora Reporter: Matt McCutchen <matt>
Component: mkinitrdAssignee: Peter Jones <pjones>
Status: CLOSED CURRENTRELEASE QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: low Docs Contact:
Priority: low    
Version: 9CC: dcantrell, wtogami
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: 6.0.36-1 Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2008-06-22 16:23:15 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:
Attachments:
Description Flags
Patch to /sbin/mkinitrd that seems to fix the problem none

Description Matt McCutchen 2008-02-24 01:46:10 UTC
Description of problem:
I use a swap partition encrypted with dm-crypt and LUKS.  It is listed in
/etc/fstab as "/dev/mapper/swap".  mkinitrd fails to include the necessary
cryptography modules in the initrd to resume from hibernation using the swap
partition.  This is because function "findstoragedriver" does not check for a
"/dev/mapper"-format name.

Version-Release number of selected component (if applicable):
mkinitrd-6.0.30-1.fc9

How reproducible:
Always

Steps to Reproduce:
1. Make an LUKS-encrypted partition.
2. Add the partition to crypttab with name "swap".
3. Add the following to /etc/fstab:
/dev/mapper/swap	swap	swap	defaults	0 0
4. Install a new kernel with yum.

Actual results:
The necessary cryptographic modules are not included in the new initrd.

Expected results:
The modules are included.

Additional info:
The patched mkinitrd from bug 124789 comment 118 recognizes the partition fine.
 A workaround for the current mkinitrd is to list the partition in /etc/fstab
using a /dev/dm-X name, but the number is more fragile if dm partitions are
reconfigured in the future.

Comment 1 Matt McCutchen 2008-02-24 01:46:10 UTC
Created attachment 295724 [details]
Patch to /sbin/mkinitrd that seems to fix the problem

Comment 2 Bug Zapper 2008-05-14 05:36:10 UTC
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 3 Matt McCutchen 2008-06-22 16:23:15 UTC
This appears to have been fixed in mkinitrd-6.0.36-1.