aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xshare/hydractl/provision16
1 files changed, 12 insertions, 4 deletions
diff --git a/share/hydractl/provision b/share/hydractl/provision
index 1912870..b5f23ce 100755
--- a/share/hydractl/provision
+++ b/share/hydractl/provision
@@ -294,8 +294,8 @@ else
hydra_install_package dosfstools
hydra_sudo_run parted -s -- $device mkpart fat32 ${start}s ${uefi_grub_end}s
- #hydra_sudo_run parted -s -- $device name 1 ESP
- hydra_sudo_run parted -s -- $device set 1 esp on
+ hydra_sudo_run parted -s -- $device set 1 esp on
+ hydra_sudo_run parted -s -- $device name 1 ESP
hydra_sudo_run mkfs.vfat $esp_device
fi
@@ -325,7 +325,13 @@ else
# Make a 1024MB boot partition
#boot_start="$(($bios_grub_end + 1))"
boot_size="1024"
- boot_start="`partition_sector_start $start $bios_grub_end $optimal_sector_size`"
+
+ if [ "$boot_mode" == "bios" ]; then
+ boot_start="`partition_sector_start $start $bios_grub_end $optimal_sector_size`"
+ else
+ boot_start="`partition_sector_start $start $uefi_grub_end $optimal_sector_size`"
+ fi
+
boot_size="$(($boot_size * $mebibyte / $block_size))"
boot_end="$(($boot_start + $boot_size -1))"
#lvm_start="$($boot_end + 1))"
@@ -345,7 +351,9 @@ else
fi
fi
-hydra_sudo_run parted -s -- $device set 2 boot on
+if [ "$boot_mode" == "bios" ]; then
+ hydra_sudo_run parted -s -- $device set 2 boot on
+fi
# Take a small break to devices table be updated
sleep 2