aboutsummaryrefslogtreecommitdiff
path: root/share
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2022-01-25 10:13:19 -0300
committerSilvio Rhatto <rhatto@riseup.net>2022-01-25 10:13:19 -0300
commit670e5f74788413597d43ddd041c4271fe419f97b (patch)
tree499146526594e8e19754fb4e87f141e52c137cf8 /share
parent8cf0619f0671adb3edd6b8e63970dc932a750841 (diff)
downloadhydra-670e5f74788413597d43ddd041c4271fe419f97b.tar.gz
hydra-670e5f74788413597d43ddd041c4271fe419f97b.tar.bz2
Fix: provision: UEFI: additional corrections
Diffstat (limited to 'share')
-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