Bug 505518

Summary: RFE: installer support for crypttab's swap option
Product: [Fedora] Fedora Reporter: udo <udovdh>
Component: anacondaAssignee: David Lehman <dlehman>
Status: ASSIGNED --- QA Contact: Fedora Extras Quality Assurance <extras-qa>
Severity: medium Docs Contact:
Priority: medium    
Version: rawhideCC: draeath, ianowl, katyaberezyaka, rmaximo, vanmeeuwen+fedora
Target Milestone: ---   
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: Type: ---
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:
Attachments:
Description Flags
after entering the passphrase for my /home part none

Description udo 2009-06-12 08:08:07 UTC
Description of problem:
Even though Fedora 10 supports encrypted swap and filesystems, f11 anaconda can't deal with encrypted swap: it insists on needing swap on a 4G machine. it insists on using all swap partitions available.

Version-Release number of selected component (if applicable):
See the F11 DVD

How reproducible:
Have F10 machine with encrypted swap, e.g. 'swap	/dev/sda10	/dev/urandom	swap,cipher=aes-cbc-essiv:sha256,size=256' in /etc/crypttab
Upgrade to F11 using the dvd.

Steps to Reproduce:
1. Have F10 machine with encrypted swap
2. Upgrade to F11 using DVD
3. see Anaconda fail
  
Actual results:
Error

Expected results:
No error

Additional info:
Seen on x86_64

Comment 1 udo 2009-06-20 06:25:55 UTC
Very much related:
Also see https://bugzilla.redhat.com/show_bug.cgi?id=501198 where the F10 installer creates a crypttab entry for the whole disk (except /boot) that is incompatible with what F11 ramdisks expect.

F10 was the original Fedora installed.
I got a line like:
luks-4a65c764-b0b1-4b1f-94fb-c76d1bc3e287
UUID=4a65c764-b0b1-4b1f-94fb-c76d1bc3e287 none

but the luks-bla phrase is wrong for F11 and prevents decryption from working.

Comment 2 foudfou 2009-06-24 13:22:30 UTC
Created attachment 349237 [details]
after entering the passphrase for my /home part

I have the same problem. Thought some logs might help.

Comment 3 udo 2009-06-24 13:27:51 UTC
Workaround is to temporarily change swap back to unencrypted.
(swapoff /dev/mapper/bla; mkswap /dev/bla; vi /etc/crypptab; vi /etc/fstab; reboot)

Comment 4 udo 2009-12-09 16:22:05 UTC
Hmmm.
Fedora 12 did not complain about swap in the FEW situations that I could use the CD/DVD.

Comment 5 Bug Zapper 2010-04-27 14:48:35 UTC
This message is a reminder that Fedora 11 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 11.  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 '11'.

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 11'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 11 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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 6 udo 2010-04-27 14:53:40 UTC
Nothign was done so we up the version.

Comment 7 Bug Zapper 2010-11-04 11:08:07 UTC
This message is a reminder that Fedora 12 is nearing its end of life.
Approximately 30 (thirty) days from now Fedora will stop maintaining
and issuing updates for Fedora 12.  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 '12'.

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 12'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 12 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 please change the 'version' of this 
bug to the applicable version.  If you are unable to change the version, 
please add a comment here and someone will do it for you.

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 8 udo 2010-11-04 17:30:58 UTC
Nothign was done so we up the version.
And why close a ticket that is against rawhide?
Bugzapper says F12...

Comment 9 David Lehman 2012-02-07 21:19:17 UTC
*** Bug 788236 has been marked as a duplicate of this bug. ***

Comment 10 Paul Bransford 2012-02-07 21:24:00 UTC
Copying over my workaround from Bug 788236.

creating a keyfile (for example in /etc/luks/), adding it to the
volume, and then changing "none" to this path+filename in /etc/crypttab appears to work. On
boot, my root volume is unlocked, then the keyfile stored in /etc is used to
unlock the swap volume, which is then mounted.

Setting this up on installation is something that could be automated by
Anaconda.

The suspend/resume on this hardware is a bit buggy, so I can't thoroughly test
it's function with this.

Comment 11 Paul Bransford 2012-02-08 16:18:40 UTC
Indeed I cannot suspend to disk using this. After it writes for about 10-15 seconds the console spews with IO errors writing to a block, with the block number incrementing.

I cannot reproduce read/write errors on this hardware outside of this instance.

I have no idea if this is the encryption at fault, or some other problem.

Comment 12 David Shea 2016-04-08 20:12:33 UTC
*** Bug 1254064 has been marked as a duplicate of this bug. ***

Comment 13 udo 2016-04-09 03:49:11 UTC
Any updates? Progress? Patches?

Comment 14 David Lehman 2016-04-11 13:15:07 UTC
This is not a high-priority item for us, but patches are certainly welcome. Keep in mind that if you want support for this at installation time it will require patches to blivet, pykickstart, and anaconda.