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