Preseeding debian install - EFI
I'm exactly at this point now, recording manual installation from PXE netboot to the UEFI VMWare system to extract right answers for preseed
with debconf-get-selections --installer
. What I see in the resulting file is:
partman-auto partman-auto/choose_recipe select /lib/partman/recipes-amd64-efi/30atomic
partman-base partman/default_filesystem string ext4
The content of which should give you the hint how to master your receipt:
partman-auto/text/atomic_scheme ::
538 538 1075 free
$iflabel{ gpt }
$reusemethod{ }
method{ efi }
format{ } .
128 512 256 ext2
$defaultignore{ }
method{ format }
format{ }
use_filesystem{ }
filesystem{ ext2 }
mountpoint{ /boot } .
500 10000 -1 $default_filesystem
$lvmok{ }
method{ format }
format{ }
use_filesystem{ }
$default_filesystem{ }
mountpoint{ / } .
100% 512 200% linux-swap
$lvmok{ }
$reusemethod{ }
method{ swap }
format{ } .
Based on that and as I'm using partman/early_command
to generate appropriate layout for the given machine, I've scripted:
if [ -d "/sys/firmware/efi/" ]; then
debconf-set "partman-auto/expert_recipe" "$(
echo -n '600 600 1075 free $iflabel{ gpt } $reusemethod{ } method{ efi } format{ } . '
echo -n '128 512 256 ext2 $defaultignore{ } method{ format } format{ } use_filesystem{ } filesystem{ ext2 } mountpoint{ /boot } . '
echo -n '9216 2000 -1 $default_filesystem $lvmok{ } method{ format } format{ } use_filesystem{ } $default_filesystem{ } mountpoint{ / } .'
)"
fi
And as a result got automagically:
# parted /dev/sda print free
Model: VMware Virtual disk (scsi)
Disk /dev/sda: 10.7GB
Sector size (logical/physical): 512B/512B
Partition Table: gpt
Disk Flags:
Number Start End Size File system Name Flags
17.4kB 1049kB 1031kB Free Space
1 1049kB 600MB 599MB fat32 boot, esp
2 600MB 10.7GB 10.1GB ext4
10.7GB 10.7GB 1032kB Free Space