summaryrefslogtreecommitdiff
path: root/roles/installer/debian/preseed/templates/partman_config.j2
diff options
context:
space:
mode:
Diffstat (limited to 'roles/installer/debian/preseed/templates/partman_config.j2')
-rw-r--r--roles/installer/debian/preseed/templates/partman_config.j228
1 files changed, 16 insertions, 12 deletions
diff --git a/roles/installer/debian/preseed/templates/partman_config.j2 b/roles/installer/debian/preseed/templates/partman_config.j2
index ebaf180e..2d125b50 100644
--- a/roles/installer/debian/preseed/templates/partman_config.j2
+++ b/roles/installer/debian/preseed/templates/partman_config.j2
@@ -1,3 +1,4 @@
+{# https://unix.stackexchange.com/questions/510445/install-grub-bootloader-dynamically-to-multiple-disks #}
d-i partman/early_command string /partman_early-command.sh
d-i partman/confirm boolean true
@@ -9,11 +10,6 @@ d-i partman-lvm/device_remove_lvm boolean true
d-i partman-lvm/confirm boolean true
d-i partman-lvm/confirm_nooverwrite boolean true
-{% if hostvars[install_hostname].install_cooked.disks.primary == "software-raid" %}
-d-i partman-auto/method string raid
-{% else %}
-d-i partman-auto/method string lvm
-{% endif %}
d-i partman-auto/purge_lvm_from_device boolean true
d-i partman-auto-lvm/new_vg_name string {{ hostvars[install_hostname].host_name }}
d-i partman-auto-lvm/guided_size string max
@@ -28,35 +24,44 @@ d-i partman/choose_label string dos
d-i partman/default_label string dos
{% endif %}
+
+{% if hostvars[install_hostname].install_cooked.disks.primary == "software-raid" %}
+d-i partman-auto/method string raid
+{% else %}
+d-i partman-auto/method string lvm
+{% endif %}
+
d-i partman-auto/choose_recipe select ansible
d-i partman-auto/expert_recipe string \
ansible :: \
{% if (hostvars[install_hostname].install_cooked.efi | default(false)) %}
100 100 128 fat16 \
- $defaultignore{ } $primary{ } $bootable{ } \
+ $primary{ } $bootable{ } \
method{ efi } format{ } \
. \
{% endif %}
{% if hostvars[install_hostname].install_cooked.disks.primary == "software-raid" %}
256 10000 256 raid \
- $lvmignore{ } $primary{ } method{ raid } \
+ $lvmignore{ } $primary{ } $bootable{ } \
+ method{ raid } \
. \
1000 10000 -1 raid \
- $lvmignore{ } $primary{ } method{ raid } \
+ $lvmignore{ } $primary{ } \
+ method{ raid } \
. \
{% endif %}
1000 10000 -1 ext4 \
$defaultignore{ } $primary{ } $bootable{ } \
method{ lvm } vg_name{ {{ hostvars[install_hostname].host_name }} } \
. \
- 2560 10000 2560 ext4 \
+ 2048 10000 2560 ext4 \
$defaultignore{ } $lvmok{ } \
in_vg{ {{ hostvars[install_hostname].host_name }} } \
method{ format } format{ } \
use_filesystem{ } filesystem{ ext4 } \
mountpoint{ / } \
. \
- 1280 10000 1280 ext4 \
+ 1024 10000 1280 ext4 \
$defaultignore{ } $lvmok{ } \
in_vg{ {{ hostvars[install_hostname].host_name }} } \
method{ format } format{ } \
@@ -86,6 +91,5 @@ d-i partman/choose_partition select finish
## boot devices are configured by partman/early_command
-d-i grub-installer/bootdev seen true
d-i grub-installer/only_debian boolean true
-d-i grub-installer/with_other_os boolean false
+d-i grub-installer/with_other_os boolean true