Bug 781728

Summary: hibernate fails with encrypted swap
Product: [Fedora] Fedora Reporter: Dave Jones <davej>
Component: anacondaAssignee: Anaconda Maintenance Team <anaconda-maint-list>
Status: CLOSED WONTFIX QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 16CC: anaconda-maint-list, dracut-maint, gajownik, g.kaviyarasu, harald, jonathan, pfrields, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2013-02-13 08:45:34 UTC Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Attachments:
Description Flags
grub2 configuration file
none
list of partitions
none
dmesg with dracut debug messages (rd.debug set in kernel commandline)
none
pm-utils-bugreport-info.sh output none

Description Dave Jones 2012-01-14 17:09:19 UTC
I'm not sure how this is supposed to work, but it fails completely right now.

Hibernate will write the suspend image to the encrypted swap partition, but on power up, dracut ignores it. I'm guessing that the "ask for password" stuff to unlock the encrypted swap happens after the "is there a hibernate partition on the swap device" check.

Worst case, we should disable the ability to hibernate in the presence of encrypted swap.

Comment 1 Harald Hoyer 2012-01-16 10:30:06 UTC
(In reply to comment #0)
> I'm not sure how this is supposed to work, but it fails completely right now.
> 
> Hibernate will write the suspend image to the encrypted swap partition, but on
> power up, dracut ignores it. I'm guessing that the "ask for password" stuff to
> unlock the encrypted swap happens after the "is there a hibernate partition on
> the swap device" check.
> 
> Worst case, we should disable the ability to hibernate in the presence of
> encrypted swap.

what is your kernel command line?

Comment 2 Harald Hoyer 2012-01-23 10:30:32 UTC
you should have "rd.luks.uuid=<encrypted swap uuid>" on your kernel command line.

Comment 3 Harald Hoyer 2012-02-20 12:35:15 UTC
does comment #2 work for you?

Comment 4 Dawid Gajownik 2012-04-11 14:42:08 UTC
I have this option in my /boot/grub2/grub.cfg (please take a look at the attached files) and it does not work for me. I have similar situation as Dave: system hibernates correctly, but dracut ignores the image written to the encrypted swap partition.

After removing encryption from the swap partition everything works fine. Would you like me to provide more information?

Comment 5 Dawid Gajownik 2012-04-11 14:43:49 UTC
Created attachment 576799 [details]
grub2 configuration file

Comment 6 Dawid Gajownik 2012-04-11 14:44:38 UTC
Created attachment 576800 [details]
list of partitions

Comment 7 Dawid Gajownik 2012-04-11 14:46:16 UTC
Created attachment 576801 [details]
dmesg with dracut debug messages (rd.debug set in kernel commandline)

Comment 8 Dawid Gajownik 2012-04-11 14:47:09 UTC
Created attachment 576802 [details]
pm-utils-bugreport-info.sh output

Comment 9 Harald Hoyer 2012-04-16 13:00:52 UTC
you might want to add "resume=UUID=<uuid_of_resume>" partition

Comment 10 Dawid Gajownik 2012-04-16 21:04:08 UTC
Thanks Harald, it's working! Maybe this option should be documented? dracut.kernel doesn't mention it.

It would be more user friendly if this option had been added in the /etc/default/grub configuration file by anaconda during installation :)

Comment 11 Harald Hoyer 2012-04-17 10:05:28 UTC
(In reply to comment #10)
> Thanks Harald, it's working! Maybe this option should be documented?
> dracut.kernel doesn't mention it.
> 
> It would be more user friendly if this option had been added in the
> /etc/default/grub configuration file by anaconda during installation :)

True. I'll document the option, and reassign the bug to anaconda.

Comment 12 Dawid Gajownik 2012-04-17 13:35:49 UTC
I've done few tests and I noticed that without "resume" option hibernation works only if encrypted swap is the primary partition. If it's logical one inside extended partition you need to add "resume" option. HTH

Comment 13 Fedora End Of Life 2013-01-16 10:13:02 UTC
This message is a reminder that Fedora 16 is nearing its end of life.
Approximately 4 (four) weeks from now Fedora will stop maintaining
and issuing updates for Fedora 16. It is Fedora's policy to close all
bug reports from releases that are no longer maintained. At that time
this bug will be closed as WONTFIX if it remains open with a Fedora 
'version' of '16'.

Package Maintainer: If you wish for this bug to remain open because you
plan to fix it in a currently maintained version, simply change the 'version' 
to a later Fedora version prior to Fedora 16's end of life.

Bug Reporter: Thank you for reporting this issue and we are sorry that 
we may not be able to fix it before Fedora 16 is end of life. If you 
would still like to see this bug fixed and are able to reproduce it 
against a later version of Fedora, you are encouraged to click on 
"Clone This Bug" and open it against that version of Fedora.

Although we aim to fix as many bugs as possible during every release's 
lifetime, sometimes those efforts are overtaken by events. Often a 
more recent Fedora release includes newer upstream software that fixes 
bugs or makes them obsolete.

The process we are following is described here: 
http://fedoraproject.org/wiki/BugZappers/HouseKeeping

Comment 14 Fedora End Of Life 2013-02-13 08:45:37 UTC
Fedora 16 changed to end-of-life (EOL) status on 2013-02-12. Fedora 16 is 
no longer maintained, which means that it will not receive any further 
security or bug fix updates. As a result we are closing this bug.

If you can reproduce this bug against a currently maintained version of 
Fedora please feel free to reopen this bug against that version.

Thank you for reporting this bug and we are sorry it could not be fixed.