diff --git a/setup.sh b/setup.sh index 9a051b5..483b1d3 100644 --- a/setup.sh +++ b/setup.sh @@ -136,6 +136,22 @@ function select_part () { parts="$(get_parts "${part_type}")" fi + if [[ ! "${parts}" ]]; then + case "${part_type}" in + efi) + part_type_human_readable='EFI system partition (ESP) with partition type code EF00' + ;; + zfs) + part_type_human_readable='ZFS zpool partition with partition type code BF00' + ;; + esac + printf -- '%s\n' \ + 'It looks as if there is no '"${part_type_human_readable}" \ + 'on any of the disks. Did you correctly partition a disk before starting?' \ + 'Check https://quico.space/quico-os-setup/arch-zbm#prep. Exiting ...' + exit 77 + fi + if we_have_exactly_one_part "${part_type}" "${parts}"; then part="${parts}" else