X-Git-Url: https://iankelling.org/git/?p=automated-distro-installer;a=blobdiff_plain;f=fai%2Fconfig%2Fhooks%2Fpartition.DEFAULT;fp=fai%2Fconfig%2Fhooks%2Fpartition.DEFAULT;h=410b915651aef26b658fce62fc3492c2c173d395;hp=1586e48a2f86866c16552ff7b4ce27be3d0e161f;hb=ceeb4e46d3bb326d01fcc7ed98d94ab0b580eda3;hpb=79cd04733bf570db299ef09195c498a63f3f3fd5 diff --git a/fai/config/hooks/partition.DEFAULT b/fai/config/hooks/partition.DEFAULT index 1586e48..410b915 100755 --- a/fai/config/hooks/partition.DEFAULT +++ b/fai/config/hooks/partition.DEFAULT @@ -866,8 +866,13 @@ if $partition; then # so use fixed sizes to allow both to grow # 600 = uefi 512 + grubext 8 + bios grub 3 + some extra cuz this is lvm #root_mib=$(( disk_mib - root2_part_mib - swap_mib - boot_part_mib - boot2_part_mib - 600 )) - root_mib=$(( 1000 * 1000 )) # * 1000 to make it in gb. o_mib=$(( 120 * 1000 )) + # max minus o, minus a gig just for some extra space + max_root_mib=$(( disk_mib - root2_part_mib - swap_mib - boot_part_mib - boot2_part_mib - 600 - o_mib - 1000 )) + root_mib=$(( 1000 * 1000 )) # * 1000 to make it in gb. + if (( max_root_mib < root_mib )); then + root_mib=$max_root_mib + fi fi if [[ ! $SPECIAL_DISK ]]; then