Preseed failing partman full-disk encryption

Asked by Jay C

Note - I did "steal" this preseed configuration from a different question thread :')

Hello,

I have been trying to preseed drive encryption for a custom Ubuntu iso. However whenever I try to create it with the preseed specifications below, it fails and basically tells me that the targeted encryption drive is already in use by ubuntu-vg. When I try to make a custom-lvm table, it fails in the same way, except saying the targeted drive is in use by whatever I set the custom name to.

d-i partman-auto/disk string /dev/sda
d-i partman-auto/method string crypto
d-i partman-crypto/passphrase password T3mp
d-i partman-crypto/passphrase-again password T3mp
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-auto/choose_recipe select atomic
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true

Any suggestions? Everything I have looked up online so far just tells me that just having partman encrypt within the preseed works, either with the atomic recipe or custom-lvm.

Question information

Language:
English Edit question
Status:
Solved
For:
Cubic Edit question
Assignee:
No assignee Edit question
Solved by:
Jay C
Solved:
Last query:
Last reply:
Revision history for this message
Jay C (jtc44) said :
#1

Apparently it was failing due to an incompatibility with MBR/BIOS boot. Attempting the same preseed entries with UEFI boot formatted the drive properly.

Here's a snippet of what I have for partman in ubuntu.seed (which works):

# The following is useful for preseed installing to a machine with multiple drives. Otherwise, uncomment the line ending in /dev/sda.
d-i partman/early_command string debconf-set partman-auto/disk
"$(list-devices disk | head -n1)"
# d-i partman-auto/disk string /dev/sda

d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-auto/method string crypto
# d-i partman-crypto/passphrase password
# d-i partman-crypto/passphrase-again password
d-i partman-auto-lvm/guided_size string max
d-i partman-auto/choose_recipe select atomic
d-i partman/default_filesystem string ext4
d-i partman-partitioning/confirm_write_new_label boolean true
d-i partman/choose_partition select finish
d-i partman/confirm boolean true
d-i partman/confirm_nooverwrite boolean true