summaryrefslogtreecommitdiff
path: root/install-artix.sh
diff options
context:
space:
mode:
authorBlake Romero <blake@blkrom.com>2024-04-03 14:18:31 +0100
committerBlake Romero <blake@blkrom.com>2024-04-03 14:18:31 +0100
commitfab206b373f68245a97b3aa33e045eb4ed8ac103 (patch)
tree781f03a4b35bd116f534f5bf49fa272fe78b3dc5 /install-artix.sh
parent2dc047ebd03056a838d7d662dca6b6ce37469f38 (diff)
Fix incorrect boot size
Diffstat (limited to 'install-artix.sh')
-rwxr-xr-xinstall-artix.sh8
1 files changed, 5 insertions, 3 deletions
diff --git a/install-artix.sh b/install-artix.sh
index 2ee0fe2..05e95e9 100755
--- a/install-artix.sh
+++ b/install-artix.sh
@@ -79,9 +79,10 @@ ram_gb=$(bc <<< "${ram_kB} / 1000^2")
&& swap_size="$(bc <<< "sqrt(${ram_gb}) * 4")G"
# Get boot size if using an already created partition
-# (note: used for prompt confirmation)
+# (note: only used for prompt confirmation)
if [[ $duel_boot == true ]]; then
- boot_size=$(df -h "${boot}" | awk 'NR==2 {print $2}')
+ boot_bytes=$(blockdev --getsize64 "${boot}")
+ boot_size="$(bc <<< "${boot_bytes} / 1000000000")G"
fi
# Set boot type
@@ -96,7 +97,8 @@ else
fi
# Request confirmation
-drive_size=$(df -h "${drive}" | awk 'NR==2 {print $2}')
+drive_bytes=$(blockdev --getsize64 "${drive}")
+drive_size="$(bc <<< "${drive_bytes} / 1000000000")G"
features=""
[[ $encrypt == true ]] && features+="encrypt "