Cannot configure 'cryptsetup luksFormat' at install time
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
partman-crypto (Debian) |
New
|
Unknown
|
|||
partman-crypto (Ubuntu) |
Invalid
|
Undecided
|
Unassigned | ||
Focal |
Fix Released
|
Undecided
|
Mauricio Faria de Oliveira | ||
Groovy |
Invalid
|
Undecided
|
Unassigned | ||
Hirsute |
Invalid
|
Undecided
|
Unassigned | ||
ubiquity (Ubuntu) |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira | ||
Focal |
Fix Released
|
Undecided
|
Unassigned | ||
Groovy |
Won't Fix
|
Undecided
|
Unassigned | ||
Hirsute |
Fix Released
|
Medium
|
Mauricio Faria de Oliveira |
Bug Description
[Impact]
* Users cannot specify options for 'cryptsetup luksFormat'
that is used by the installer.
* Some deployments need the installed disks in LUKS1 format
for backward compatibility with older releases that don't
support LUKS2, for backup/
* However, on Focal and later, cryptsetup defaults to LUKS2,
which broke that functionality.
* Currently it's not possible to request the LUKS format in
the installer, so this patch allows for that w/ a preseed
option ('partman-
[Test Case]
* Default behavior: LUKS2
- Install Ubuntu (Focal/later); check LUKS header version:
$ sudo cryptsetup luksDump /dev/vda4
LUKS header information
Version: 2
...
* Opt-in behavior: LUKS1 (for example; can use other options)
- Install Ubuntu (Focal/later) with preseed file/option:
ubiquity partman-
--type luks1
- Check LUKS header version:
$ sudo cryptsetup luksDump /dev/vda4
LUKS header information for /dev/vda4
Version: 1
...
- Check install logs for confirmation:
$ grep luksFormat /var/log/partman
/usr/
[Where problems could occur]
* The changes are contained within the partman-crypto functionality,
so only install with encrypted disks should be affected by issues.
* Any additional options specified to 'cryptsetup luksFormat' are
opt-in _and_ specified by the user via the preseed option, thus
errors are probably tied to particular options (mis) used.
* If the preseed option is not specified, original behavior remains.
[Other Info]
* This patch is applied in Hirsute.
* This patch is not needed in Groovy (rationale in comment #15.)
* This patch is targeted at Focal (cryptsetup defaulted to LUKS2.)
* This patch is not needed in Bionic/earlier (^defaults to LUKS1.)
[Original Description]
Most users should be fine with the options to
'cryptsetup luksFormat' used by the installer.
However, some users may have reasons to use
other options, and that is not possible now.
Let's provide a new preseed option for that:
'partman-
Related branches
- Łukasz Zemczak: Needs Resubmitting
-
Diff: 70 lines (+26/-2)4 files modifiedd-i/source/partman-crypto/debian/changelog (+9/-0)
d-i/source/partman-crypto/debian/partman-crypto.templates (+5/-0)
d-i/source/partman-crypto/lib/crypto-base.sh (+6/-2)
debian/changelog (+6/-0)
- Łukasz Zemczak: Approve
-
Diff: 56 lines (+20/-2)3 files modifieddebian/changelog (+9/-0)
debian/partman-crypto.templates (+5/-0)
lib/crypto-base.sh (+6/-2)
tags: | added: patch |
tags: | added: sts |
Changed in ubiquity (Ubuntu): | |
importance: | Low → Medium |
tags: | added: fr-933 |
Changed in ubiquity (Ubuntu Focal): | |
status: | Invalid → In Progress |
tags: | removed: sts-sponsor-mfo |
Changed in partman-crypto (Debian): | |
status: | Unknown → New |
Attaching a working patch; for reference.