View Issue Details

IDProjectCategoryView StatusLast Update
0005974Rocky-Linux-9anacondapublic2024-02-28 13:44
ReporterAlyona Golz Assigned To 
PriorityhighSeveritymajorReproducibilityalways
Status newResolutionopen 
Summary0005974: Unable to Recognize Already Opened LUKS Container in Anaconda Installer
DescriptionDear Rocky Linux Team,

I hope this message finds you well. I am writing to report an issue I encountered while trying to install RockyLinux (Rocky-9.3-x86_64) using the Anaconda installer.

Problem Description:
During the installation process, Anaconda is unable to recognize an already opened LUKS container.

In the text mode of the Rocky 9.3 installation, when trying to assign mount points for partitions manually to an encrypted LUKS partition, anakonda throws the error "The existing unlocked LUKS device cannot be used for the installation without an encryption key specified for this
device. Please restart the storage", I tried to work around the error with this instruction https://linuxconfig.org/how-to-install-fedora-rhel-centos-via-kickstart-on-an-existing-luks-device but I ran into the following problem: the ks.cfg file successfully opens the LUKS partition, after partitioning the disk, the error "unlocked LUKS device cannot be used" does not occur, but when trying to continue the installation, an error appears on the screen: "luks device not configured" at the same time lsblk commands reflect the LUKS section as open
Steps To ReproducePreparation
Clone Anaconda Repository:
Clone the Anaconda git repository, specifically branch:
git clone https://github.com/rhinstaller/anaconda -b rhel-9

Navigate and Edit the Anaconda Source Code:
Go to the cloned repository and edit the anaconda/pyanaconda/modules/storage/checker/utils.py file. Comment out lines 724

Comment out the following lines:
# self.add_check(verify_unlocked_devices_have_key)

Generate the updates.img File:
Go back to the anaconda root folder: ~/anaconda Run makeupdates:
./scripts/makeupdates

Start the installation of RockyLinux (version 9.3-x86_64) using the Anaconda installer.

Choose the option for manual partitioning during the installation process.

Assign the following mount points to the respective partitions:
/dev/sda1 as the /boot partition (512M)
/dev/sda5 as the LUKS-encrypted volume containing the LVMGroup:
/dev/LVMGroup/root (10G)
/dev/LVMGroup/swap (2.3G)

In the %pre section of the kickstart configuration, include the following code to open the LUKS container /dev/sda5:

%pre
iotty="$(tty)"
exec > "${iotty}" 2> "${iotty}"

while true; do
  cryptsetup luksOpen /dev/sda5 sda5_crypt - && break
done
%end

Continue with the installation process, ensuring that the LUKS container /dev/sda5 is successfully opened.
After partitioning the disk and attempting to proceed with the installation, Anaconda displays the error "luks device not configured" and fails to continue.


Additional InformationInstallation File:
https://raw.githubusercontent.com/AGolz/Born2beRoot/main/updates.img

Resolution Attempted:

I found discussions related to this issue on GitHub:
https://github.com/rhinstaller/anaconda/pull/2424
https://bugzilla.redhat.com/show_bug.cgi?id=1772902

Unfortunately, none of the solutions provided in these discussions worked for Rocky-9.3-x86_64. It's worth noting that there was no such problem in Rocky-9.1-x86_64. Detailed explanations and recommendations for version 9.1 can be found here https://github.com/AGolz/Born2beRoot, and they have been effective for version 9.1 thus far.

Expected Behavior:
Anaconda should recognize and utilize the already open LUKS container for installation.

I kindly request your assistance in resolving this issue. If there are any workarounds or steps I can take to successfully complete the installation, please let me know.

Thank you for your attention to this matter. I look forward to your prompt response.
Tagsanacoda

Activities

Alyona Golz

Alyona Golz

2024-02-28 13:44

reporter   ~0006205

I would like to draw your attention to the fact that version 9.1 does not require additional manipulations at all to reopen the LUKS container. After opening the container and scanning the disk from the installation menu, the LUKS container remains open and does not interfere with the continuation of the installation.

Issue History

Date Modified Username Field Change
2024-02-28 13:16 Alyona Golz New Issue
2024-02-28 13:18 Alyona Golz Tag Attached: anacoda
2024-02-28 13:44 Alyona Golz Note Added: 0006205