** Description changed:

+ [ Impact ]
+ 
+ * Ubuntu's Calamares contains a patch that is intended to close all LUKS
+ volumes that Calamares used as part of the installation process, for
+ enhanced security. Due to a bug in this patch, Calamares attempts to
+ close LUKS volumes that it did not open and that aren't even open at
+ all. These attempts fail, resulting in an installation failure message
+ appearing during the final unmount step of the installation.
+ 
+ * This is technically cosmetic as the installation is fully complete at
+ this time and can be used despite the installation failure message, but
+ it is alarming and confusing for the end user.
+ 
+ * The new Calamares upload for Resolute fixes this by checking an
+ additional flag that Calamares sets when it decides that a volume
+ "belongs" to it. If that flag is set, we attempt to close the volume,
+ otherwise we skip it.
+ 
+ [ Test Plan ]
+ 
+ * Create a new virtual machine with 64 GB disk space and UEFI firmware.
+ * Boot the Kubuntu ISO in it.
+ * When the installer prompt screen appears, click "Try Kubuntu".
+ * Open KDE Partition Manager.
+ * Create a new GPT partition table on the VM's disk.
+ * Create an 8 GB ext4 LUKS2 partition on the disk.
+ * Apply changes.
+ * Open Konsole, unmount the newly created filesystem, and close the 
corresponding LUKS volume if necessary.
+ * Install the Calamares update from -proposed.
+ * Launch Calamares.
+ * Proceed through the installation, accepting all defaults, until you get to 
the Partitions screen.
+ * Select "manual partitioning".
+ * Keep the LUKS partition at the start of the disk and do not create a new 
partition table.
+ * Create a 300 MiB FAT32 partition, mounted to /boot/efi and with the boot 
flag set.
+ * Create a 4096 MiB ext4 partition, mounted to /boot.
+ * Fill the remainder of the disk with an encrypted ext4 partition, mounted to 
/.
+ * Proceed through the rest of the installation, accepting all defaults.
+ * Ensure the installation succeeds and shows an "All done" message at the end.
+ * Before rebooting, open Konsole, run `lsblk`, and ensure that the root 
filesystem's LUKS volume is both unmounted and closed.
+ * Reboot into the installed system and verify it functions as expected.
+ 
+ [ Where problems could occur ]
+ 
+ * It is possible that further problems with closing LUKS volumes could
+ still exist. This could cause "Installation failure" messages to appear
+ even when the installation succeeded. This would be no (or only
+ marginally) worse than what we have now. Alternatively, the patch could
+ make it so that we fail to close LUKS volumes after installation. This
+ would be non-ideal (since it could leave data exposed a bit longer than
+ necessary, or it could require a reboot to retry an installation), but
+ not fatal.
+ 
+ [ Other Info ]
+ 
+ * This upload is close to the release of 26.04.1, but I'm targeting it
+ to 26.04.2 since it's way too late in the game to change anything else
+ in 26.04.1 if we don't absolutely have to.
+ 
+ -----
+ 
+ Original bug report:
+ 
  Calamares fails with the following message:
  Installation failed "could not close encrypted partition on the target system"
  
  Reported upstream at:
  https://codeberg.org/Calamares/calamares/issues/2517
  
  The issue is:
  1. Upstream Calamares fails to properly unmount LUKS partitions.
  2. Uubuntu's patch (unmount-encrypted-devices.patch) resolves the issue only 
partially since it mistakenly handling unrelated LUKS partitions and detecting 
random devices/partitions as LUKS.
  
  Attaching the fixed version of unmount-encrypted-devices.patch patch.

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/2156681

Title:
  Calamares fails to finish the install when there are multiple LUKS
  devices

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/calamares/+bug/2156681/+subscriptions


-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to