Bug 2087218

Summary: [RHEL 9] Unable to set luks passphrase during installation in GUI , if --passphrase is skipped in kickstart file.
Product: Red Hat Enterprise Linux 9 Reporter: Jan Stodola <jstodola>
Component: anacondaAssignee: Vendula Poncova <vponcova>
Status: CLOSED ERRATA QA Contact: Release Test Team <release-test-team-automation>
Severity: medium Docs Contact:
Priority: unspecified    
Version: 9.0CC: amepatil, jikortus, jkonecny, jstodola, release-test-team-automation, rvykydal, sbarcomb, tgunders, vponcova
Target Milestone: rcKeywords: Triaged
Target Release: ---   
Hardware: All   
OS: Linux   
Whiteboard:
Fixed In Version: anaconda-34.25.1.6-1.el9 Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: 2029101 Environment:
Last Closed: 2022-11-15 09:58:45 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Jan Stodola 2022-05-17 15:33:06 UTC
+++ This bug was initially created as a clone of Bug #2029101 +++

This is similar to the issue discussed at https://bugzilla.redhat.com/show_bug.cgi?id=1970319 however the context is different here.


During kickstart installation with encrypted partitioning if user omit the --passphrase part so they can set it during installation. The partitioning scheme is not retained hence unable to set passphrase similar to how we have for RHEL 7

~~~
part pv.01     --fstype="lvmpv"        --size=1	  --ondisk="$INSTALLDISK"	--grow --encrypted [--passphrase testtest]
~~~


Current documentation, points to that if --passphrase is not given with --encrypted, then installer will prompt for it.

~~~
--encrypted - Specifies that this partition should be encrypted with Linux Unified Key Setup (LUKS), using the passphrase provided in the --passphrase option. If you do not specify a passphrase, Anaconda uses the default, system-wide passphrase set with the autopart --passphrase command, or stops the installation and prompts you to provide a passphrase if no default is set.

--passphrase= - Specifies the passphrase to use when encrypting this partition. You must use this option together with the --encrypted option; by itself it has no effect.
~~~


Under RHEL 7 when used to leave the --passphrase parameter.  The user was prompted for checking Installation Destination (due to incomplete Kickstart) and the partitioning was retained there, the user could set passphrase and click done and continue with installation.


While in RHEL 8.4 and RHEL 8.5 , as per the bug https://bugzilla.redhat.com/show_bug.cgi?id=1970319 , once user select the when the Installation Destination the information in the Kickstart file for partition layout is not presented and if we want to proceed we would have to enter all of the custom partitions manually.

I tested and it works in Text installation as it does not need to enter the graphical installer stoke for storage, and anaconda itself prompts for password on the Anaconda Tmux screen.

May be we need to give a similar prompt in graphical installation with Kickstart to set the LUKS password without entering the storage stoke which would cause a reset the partitioning similar to Text install with Kickstart or if its not supported then update  the documentation to reflect this behavior for GUI installs with Kickstart



Version-Release number of selected component (if applicable):
Anaconda RHEL 8.5 DVD/BOOT ISO

How reproducible:
Everytime.

Steps to Reproduce:
1. Set up Kickstart with encrypted partitioning and only specify --encrypted and leave --passphrase.
2. Boot with kickstart file inst.ks=<url_to_kickstart_file>
3. When the anaconda stops prompted Installation Destination (Kickstart insufficient) , we can go to the 'Installation Destination' and observe if we select 'manual partitioning' it does not retain the information from our kickstart and hence not able to set passphrase, so need to redo the full partitioning.


Actual results:
Anaconda does not retain the data we used for partitioning under installation destination so not able to set luks encryption similar to RHEL 7

Expected results:
May be we need to give a similar prompt in graphical installation with Kickstart to set the LUKS password without entering the storage stoke which would cause a reset the partitioning similar to Text install with Kickstart or if its not supported then update  the documentation to reflect this behavior for GUI installs with Kickstart

Comment 6 Jan Stodola 2022-06-20 14:27:44 UTC
Checked that anaconda-34.25.1.6-1.el9 is in nightly compose RHEL-9.1.0-20220620.0

Moving to VERIFIED

Comment 8 errata-xmlrpc 2022-11-15 09:58:45 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory (anaconda bug fix and enhancement update), and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.

https://access.redhat.com/errata/RHBA-2022:7977