preseed:
d-i partman-auto/choose_recipe select boot-encrypt
d-i partman-auto/method string crypto
d-i partman-crypto/weak_passphrase boolean true
d-i partman-crypto/passphrase string haiyun.me
d-i partman-crypto/passphrase-again string haiyun.me
d-i partman-auto-lvm/guided_size string 100%
d-i partman-auto-lvm/new_vg_name string vg00
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
d-i partman-auto/expert_recipe string \
boot-encrypt :: \
300 1 300 ext4 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ /boot } \
. \
512 2 512 linux-swap \
$lvmok{ } lv_name{ lv_swap } \
in_vg { vg00 } \
method{ swap } format{ } \
. \
1 3 -1 ext4 \
$lvmok{ } lv_name{ lv_root } \
in_vg { vg00 } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
.
kickstart:
part /boot --fstype="ext4" --ondisk=sda --size=300
part pv.01 --fstype="lvmpv" --ondisk=sda --size=1 --grow --encrypted --passphrase=haiyun.me
volgroup rootvg --pesize=4096 pv.01
logvol swap --fstype="swap" --size=512 --name=swaplv --vgname=rootvg
logvol / --fstype="ext4" --grow --size=1 --name=rootlv --vgname=rootvg