Bug 434656 - mkinitrd doesn't recognize encrypted swap given as "/dev/mapper/swap"
mkinitrd doesn't recognize encrypted swap given as "/dev/mapper/swap"
Product: Fedora
Classification: Fedora
Component: mkinitrd (Show other bugs)
All Linux
low Severity low
: ---
: ---
Assigned To: Peter Jones
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-02-23 20:46 EST by Matt McCutchen
Modified: 2008-06-22 12:23 EDT (History)
2 users (show)

See Also:
Fixed In Version: 6.0.36-1
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-06-22 12:23:15 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)
Patch to /sbin/mkinitrd that seems to fix the problem (525 bytes, patch)
2008-02-23 20:46 EST, Matt McCutchen
no flags Details | Diff

  None (edit)
Description Matt McCutchen 2008-02-23 20:46:10 EST
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):

How reproducible:

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-23 20:46:10 EST
Created attachment 295724 [details]
Patch to /sbin/mkinitrd that seems to fix the problem
Comment 2 Bug Zapper 2008-05-14 01:36:10 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
Comment 3 Matt McCutchen 2008-06-22 12:23:15 EDT
This appears to have been fixed in mkinitrd-6.0.36-1.

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