I'm playing with Debian preseed files trying to auto-partitioning a single disk. The final disk state I'm trying to reach is the following :
boot Primary Partition 1 ext3 [256MB] primary /boot (/dev/sda1)
rootfs Primary Partition 2 f2fs [16GB] primary / (/dev/sda2)
swap swap swap [4GB] swap (/dev/sda3)
extended Extended partition ext4 [42GB] primary (/dev/sda4)
|- application ext4 [4GB] logical /application (/dev/sda5)
|- database btrfs [4GB] logical /database (/dev/sda6)
|- medias btrfs [32GB] logical /medias (/dev/sda7)
For that purpose, I created the following section in the preseed file :
d-i partman-auto/expert_recipe string \
boot-root :: \
256 256 256 ext3 \
$primary{ } $bootable{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext3 } \
label{ boot } \
mountpoint{ /boot } \
. \
4096 4096 200% linux-swap \
method{ swap } format{ } \
label{ swap_part } \
mountpoint{ /swap } \
. \
16384 16384 16384 f2fs \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ f2fs } \
label{ rootfs } \
mountpoint{ / } \
. \
42000 42000 -1 ext4 \
$primary{ } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
4096 4096 4096 ext4 \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
label{ application } \
mountpoint{ /application } \
. \
4096 4096 4096 btrfs \
method{ format } format{ } \
use_filesystem{ } filesystem{ btrfs } \
label{ database } \
mountpoint{ /database } \
. \
32768 32768 32768 btrfs \
method{ format } format{ } \
use_filesystem{ } filesystem{ btrfs } \
label{ medias } \
mountpoint{ /medias } \
It doesn't work as expected and create the following :
user@debian:~$ lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 80G 0 disk
|--sda1 8:1 0 79G 0 part /
|--sda2 8:2 0 1K 0 part
|--sda5 8:5 0 975M 0 part [SWAP]
sr0 11:0 1 1024M 0 rom
It's pretty confusing since it has nothing expected based on the preseed instructions. The preseed is being downloaded on the fly and the full content can be found here :
Thanks for your insights.