I've been trying to automate a Debian install on bare metal with preseed, but I'm stumbling on not being able to partition the filesystem correctly.
What I want:
EFI Boot Swap Encrypted FDE with a root partition and a /var partition. Both on ext4
What I'm getting:
A partitioning error during install saying:
this probably happened because there are too many (primary) partitions in the partition table
How am I trying
# The disk to partition
d-i partman-auto/disk string /dev/nvme0n1
LVM with LUKS
d-i partman-auto/method string crypto
d-i partman-crypto/passphrase string inscure
d-i partman-crypto/passphrase-again string insecure
d-i partman-crypto/weak_passphrase boolean true
d-i partman-crypto/confirm boolean true
d-i partman-auto-crypto/erase_disks boolean false
d-i partman-lvm/device_remove_lvm boolean true
d-i partman-md/device_remove_md boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto-lvm/guided_size string max
d-i partman-auto-lvm/new_vg_name string crypt
d-i partman-auto/choose_recipe select root-crypto
d-i partman-auto/expert_recipe string
root-crypto ::
538 538 1075 free \
$primary{ } \
$iflabel{ gpt } \
$reusemethod{ } \
method{ efi } format{ } \
. \
256 512 512 ext2 \
$primary{ } \
$defaultignore{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext2 } \
mountpoint{ /boot } \
. \
8192 16384 16386 linux-swap \
$lvmok{ } \
in_vg { crypt } \
lv_name{ swap } \
method{ swap } format{ } \
. \
16384 16385 32768 ext4 \
$lvmok{ } lv_name{ root } \
in_vg { crypt } \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /var } \
. \
32768 65536 131072 ext4 \
$lvmok{ } lv_name{ root } \
in_vg { crypt } \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
This makes partman automatically partition without confirmation, provided
that you told it what to do using one of the methods above.
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
Force UEFI booting ('BIOS compatibility' will be lost). Default: false.
d-i partman-efi/non_efi_system boolean false
d-i partman-partitioning/choose_label select gpt
d-i partman-partitioning/default_label string gpt
I'm currently testing with a USB stick. Once I have a functioning preseed I'll move to network PXE.
Thanks for your help in advance.