Red Hat Bugzilla – Bug 434656
mkinitrd doesn't recognize encrypted swap given as "/dev/mapper/swap"
Last modified: 2008-06-22 12:23:15 EDT
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
Version-Release number of selected component (if applicable):
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.
The necessary cryptographic modules are not included in the new initrd.
The modules are included.
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.
Created attachment 295724 [details]
Patch to /sbin/mkinitrd that seems to fix the problem
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:
This appears to have been fixed in mkinitrd-6.0.36-1.