]> gitweb.fluxo.info Git - hydra.git/commitdiff
Fix: provision: use $uefi_grub_end on $lvm_start for UEFI mode
authorSilvio Rhatto <rhatto@riseup.net>
Tue, 25 Jan 2022 12:37:09 +0000 (09:37 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Tue, 25 Jan 2022 12:37:09 +0000 (09:37 -0300)
share/hydractl/provision

index 5efd56fcd12dee242ba9740bd90ee249f6409cb5..129acc0e7325ea2394cd23cc457e51c6b37d1016 100755 (executable)
@@ -305,8 +305,12 @@ else
   if [ "$encrypt" == "y" ]; then
     # Second partition must also be aligned by a multiple of $optimal_sector_size
     # So we find the minimum optimal start sector which is after the grub partition
-    #lvm_start="$(($bios_grub_end + 1))"
-    lvm_start="`partition_sector_start $start $bios_grub_end $optimal_sector_size`"
+    if [ "$boot_mode" == "bios" ]; then
+      #lvm_start="$(($bios_grub_end + 1))"
+      lvm_start="`partition_sector_start $start $bios_grub_end $optimal_sector_size`"
+    else
+      lvm_start="`partition_sector_start $start $uefi_grub_end $optimal_sector_size`"
+    fi
 
     #hydra_sudo_run parted -s -- $device unit MB mkpart ext2 3 -1
     hydra_sudo_run parted -s -- $device mkpart ext2 ${lvm_start}s -1