Bug 446117 - Encrypted swap configured but does not turn on
Encrypted swap configured but does not turn on
Product: Fedora
Classification: Fedora
Component: e2fsprogs (Show other bugs)
powerpc Linux
low Severity low
: ---
: ---
Assigned To: Eric Sandeen
Fedora Extras Quality Assurance
Depends On:
  Show dependency treegraph
Reported: 2008-05-12 16:08 EDT by W. Michael Petullo
Modified: 2008-08-02 19:40 EDT (History)
2 users (show)

See Also:
Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2008-05-13 20:58:41 EDT
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

  None (edit)
Description W. Michael Petullo 2008-05-12 16:08:10 EDT
Description of problem:
I performed a fresh install of Fedora 9 Preview and configured an encrypted swap partition using 
anaconda. However, once I booted the new system, the swap partition was not initialized. The 
command "swapon -a" did not initialized the partition.

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

How reproducible:
Every time

Steps to Reproduce:
1. Install Fedora 9 Preview, configuring an encrypted swap partition.
2. Boot the system.
Actual results:
/etc/fstab contains:

UUID=XXX swap swap defaults 0 0

This does not work.

Replacing this with:

/dev/mapper/luks-hda5 swap swap defaults 0 0

and re-running "swapon -a" results in the swapspace becoming available.

I noticed that the output of lshal has an entry for dm-0, my root partition, but not dm-1, my swap 

In addition, "blkid /dev/dm-1" prints nothing.

Expected results:
The swap space should work after being configured by anaconda.

Additional info:
Comment 1 Jeremy Katz 2008-05-12 16:11:23 EDT
What is in /etc/crypttab?  And did you get asked to unlock the swap partition
(either during the initrd or regular bootup)?
Comment 2 W. Michael Petullo 2008-05-12 18:32:37 EDT

luks-hda4   /dev/hda4   none
luks-hda5   /dev/hda5   none

Yes, I am asked for two passwords. One unlocks the root partition and one unlocks the swap partition. 
Both plaintext devices are created, /dev/mapper/luks-hda4 and luks-hda5.
The boot process sets up the LUKS device fine. Its just that "swapon -a" or "swapon -U XXX" fails. As I said 
above, using the real device name instead of the UUID in /etc/fstab works fine.
Comment 3 Jeremy Katz 2008-05-12 18:52:20 EDT
UUID for dm devs should be fine, though.  What's the output of /lib/udev/blkid
-u /dev/mapper/luks-hda5?  Does the UUID match?
Comment 4 W. Michael Petullo 2008-05-12 21:48:50 EDT
"/lib/udev/vol_id -u /dev/mapper/luks-hda5" prints out the correct UUID for /dev/mapper/luks-hda5. I 
don't see /lib/udev/blkid, but I mentioned above that "/sbin/blkid /dev/mapper/luks-hda5" prints 
Comment 5 Jeremy Katz 2008-05-12 21:54:23 EDT
Err, yeah, that's what I meant.

Okay, sounding like libblkid isn't properly looking at the dm device.  ->
e2fsprogs since that's where libblkid lives
Comment 6 Eric Sandeen 2008-05-12 22:07:04 EDT
Probably a dupe of bug #445786

Can you update to e2fsprogs-1.40.8-2 from f9 updates-testing and see if it
resolves it?



Comment 7 Eric Sandeen 2008-05-12 22:08:03 EDT
Oh, if you're on rawhide the update is there, too.
Comment 8 Eric Sandeen 2008-05-13 12:03:50 EDT
Could you please test the latest from rawhide to verify that it solves the problem?

Comment 9 W. Michael Petullo 2008-05-13 20:58:41 EDT
Yes, the e2fsprogs-1.40.8-3.fc9 package fixes my problem.

Thank you, Eric and Jeremy.
Comment 10 Bug Zapper 2008-05-14 07:03:31 EDT
Changing version to '9' as part of upcoming Fedora 9 GA.
More information and reason for this action is here:

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