Ubiquity formats Luks partition regardless of user choice and results in data loss

Bug #1939626 reported by jhansonxi
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
ubiquity (Ubuntu)
New
Undecided
Unassigned

Bug Description

Xubuntu 20.04.2
ubiquity 20.04.15.10
partman-crypto

Lost an lvm PV because of this.

Steps to reproduce:
1. Create encrypted partition with cryptsetup luksFormat
2. Check crypt partition UUID with cryptsetup luksUUID
3. Close crypt volume with cryptsetup luksClose if necessary. Launch ubiquity installer.

4. no updates
5. Installation type: Something else
6. Select an existing Luks partition and change to "physical volume for encryption".
7. "Edit partition" dialog options for "Format the partition" and "Overwrite empty disk space" are unchecked. Enter key and confirm.
8. Long pause. Crypt volume appears on main window.
9. Check crypt partition UUID again. It has changed due to an unrequested luksFormat.
10. Syslog shows:

xubuntu partman-crypto: WARNING: Device /dev/sda1 already contains a 'crypto_LUKS' superblock signature.

11. Repeat with the crypt volume open to block writes. Error dialog after step #7 reports "Configuration of encrypted volumes failed" "An error occurred while configuring encrypted volumes. The configuration has been aborted".
12. Syslog shows:

xubuntu partman-crypto: Device /dev/sda1 is in use. Can not proceed with format operation.
xubuntu partman-crypto: WARNING: Device /dev/sda1 already contains a 'crypto_LUKS' superblock signature.

Tried ubiquity --debug but didn't find anything pertaining to the problem in the other logs.

Not sure if the problem is with ubiquity, partman-crypto, or both. It needs a "cryptsetup isLuks" check somewhere along with some warnings.

Probable manifestations of the same bug:
bug 1909821
bug 1779548

Possibly related upstream bugs:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=451535
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=616716

Upstream development of parman-crypto seems very slow. Mostly just language updates.
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.16
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.445.1
DistroRelease: Ubuntu 20.04
InstallCmdLine: file=/cdrom/preseed/xubuntu.seed initrd=/casper/initrd quiet splash --- maybe-ubiquity
LiveMediaBuild: Xubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
NonfreeKernelModules: wl zfs zunicode zavl icp zcommon znvpair
Package: ubiquity 20.04.15.10 [origin: unknown]
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 5.8.0-43.49~20.04.1-generic 5.8.18
Tags: third-party-packages focal ubiquity-20.04.15.10 xubuntu
Uname: Linux 5.8.0-43-generic x86_64
UnreportableReason: This is not an official Ubuntu package. Please remove any third party package and try again.
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: N/A
_MarkForUpload: True
---
ProblemType: Bug
ApportVersion: 2.20.11-0ubuntu27.16
Architecture: amd64
CasperMD5CheckResult: pass
CasperVersion: 1.445.1
DistroRelease: Ubuntu 20.04
InstallCmdLine: file=/cdrom/preseed/xubuntu.seed initrd=/casper/initrd quiet splash --- maybe-ubiquity
LiveMediaBuild: Xubuntu 20.04.2.0 LTS "Focal Fossa" - Release amd64 (20210209.1)
NonfreeKernelModules: wl zfs zunicode zavl icp zcommon znvpair
Package: ubiquity 20.04.15.10
PackageArchitecture: amd64
ProcEnviron:
 TERM=xterm-256color
 PATH=(custom, no user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
ProcVersionSignature: Ubuntu 5.8.0-43.49~20.04.1-generic 5.8.18
Tags: focal ubiquity-20.04.15.10 xubuntu
Uname: Linux 5.8.0-43-generic x86_64
UpgradeStatus: No upgrade log present (probably fresh install)
UserGroups: N/A
_MarkForUpload: True

Revision history for this message
Chris Guiver (guiverc) wrote :

Thank you for taking the time to report this bug and helping to make Ubuntu better. Please execute the following command only once, as it will automatically gather debugging information, in a terminal:

apport-collect 1939626

When reporting bugs in the future please use apport by using 'ubuntu-bug' and the name of the package affected. You can learn more about this functionality at https://wiki.ubuntu.com/ReportingBugs.

(please boot & run the apport-collect from the media you used to do your install with)

Revision history for this message
jhansonxi (jhansonxi) wrote : Casper.txt

apport information

tags: added: apport-collected focal third-party-packages ubiquity-20.04.15.10 xubuntu
description: updated
Revision history for this message
jhansonxi (jhansonxi) wrote : Dependencies.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote : UbiquityDebug.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote : UbiquityDm.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote : UbiquityPartman.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote : UbiquitySyslog.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote : Casper.txt

apport information

description: updated
Revision history for this message
jhansonxi (jhansonxi) wrote : Dependencies.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote : ProcCpuinfoMinimal.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote : UbiquityDebug.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote : UbiquityDm.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote : UbiquityPartman.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote : UbiquitySyslog.txt

apport information

Revision history for this message
jhansonxi (jhansonxi) wrote :

The apport info is added. Second time was with "ubiquity --debug". Any passwords that may be included in the logs are of no value and were only created for this bug report.

To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.