Bug 446117 - Encrypted swap configured but does not turn on
Summary: Encrypted swap configured but does not turn on
Keywords:
Status: CLOSED NEXTRELEASE
Alias: None
Product: Fedora
Classification: Fedora
Component: e2fsprogs
Version: 9
Hardware: powerpc
OS: Linux
low
low
Target Milestone: ---
Assignee: Eric Sandeen
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2008-05-12 20:08 UTC by W. Michael Petullo
Modified: 2008-08-02 23:40 UTC (History)
2 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2008-05-14 00:58:41 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)

Description W. Michael Petullo 2008-05-12 20:08:10 UTC
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):
anaconda-11.4.0.73-2.ppc.rpm

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 
partition.

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 20:11:23 UTC
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 22:32:37 UTC
/etc/crypttab:

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 22:52:20 UTC
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-13 01:48:50 UTC
"/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 
nothing.

Comment 5 Jeremy Katz 2008-05-13 01:54:23 UTC
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-13 02:07:04 UTC
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?

https://admin.fedoraproject.org/updates/F9/pending/e2fsprogs-1.40.8-3.fc9

Thanks,

-Eric

Comment 7 Eric Sandeen 2008-05-13 02:08:03 UTC
Oh, if you're on rawhide the update is there, too.

Comment 8 Eric Sandeen 2008-05-13 16:03:50 UTC
Could you please test the latest from rawhide to verify that it solves the problem?

Thanks,
-Eric

Comment 9 W. Michael Petullo 2008-05-14 00:58:41 UTC
Yes, the e2fsprogs-1.40.8-3.fc9 package fixes my problem.

Thank you, Eric and Jeremy.

Comment 10 Bug Zapper 2008-05-14 11:03:31 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


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