Just like the last few posts on this blog, this post is about utilizing Debian installer using preseed configuration. Please consider reading the previous posts, starting at the one on scripting flexibility.
While partman is great at setting up disk partitions for the debian installer,
its configuration is not always easy to read, as it tends to consist of mostly
identical boilerplate for every host. After moving the reusable magic into
lvm-simple-parametric.sh
, all that is left is a trivially comprehensible
configuration block.
# 120 GB ST9120822AS
d-i preseed/diskdevice string /dev/sda
d-i preseed/partition_boot_sizes string 1024 1024 1024
d-i preseed/partition_root_sizes string 32000 32000 32000
d-i preseed/partition_swap_sizes string 2048 2048 2048
d-i preseed/partition_unused_sizes string 0 1 -1
d-i preseed/numbered_early_command_12 string wget+sh \
http://pxeserver./preseed/preseed-lib/lvm-luksroot-parametric.sh
The lines above create partitions of 1GiB, 32 GB and 2GiB for /boot, / and swap respectively, while leaving the rest of the disk available. That last space actually goes into a lvm partition named "unused". Any feedback on how to truly leave the remainder of the disk completely untouched is welcome.