diff options
| -rw-r--r-- | README | 4 | ||||
| -rwxr-xr-x | install-artix.sh | 8 |
2 files changed, 7 insertions, 5 deletions
@@ -40,8 +40,8 @@ CONFIGURATION: - swap_size: defaults to auto, but can be overwritten e.g: 'swap_size=8G'. -- boot_size: defaults to 512M. Can be overwritten - e.g: 'boot_size=1G'. +- boot_size: defaults to 512M. + Set 512M or more if duel-booting; e.g: 'boot_size=1G'. - timezone: a timezone (defined in '/usr/share/zoneinfo/'). - locale: a locale (defined in '/etc/locale.gen'). 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 " |
