Fix disk selection for installer prompts
This commit is contained in:
parent
a0bee59a28
commit
defa82c46c
1 changed files with 6 additions and 0 deletions
|
|
@ -85,6 +85,7 @@ if (( ! NON_INTERACTIVE )); then
|
|||
disk_choices+=("$d" "")
|
||||
done
|
||||
DISK=$(prompt_select "disk" "Select target disk (will be wiped)" "${disk_choices[@]}")
|
||||
DISK=${DISK%% *} # strip size suffix from selection
|
||||
fi
|
||||
|
||||
target_mode=$(prompt_select "mode" "Partitioning mode" \
|
||||
|
|
@ -129,6 +130,11 @@ mapper_root=""
|
|||
|
||||
echo "[1/8] Partitioning/selection"
|
||||
if [[ -z "$ROOT_PART" ]]; then
|
||||
if [[ ! -b "$DISK" ]]; then
|
||||
echo "Error: target disk ${DISK} not found. Available disks:"
|
||||
ls_disks
|
||||
exit 1
|
||||
fi
|
||||
printf "label: gpt\n,550M,U,boot\n,,L,cryptroot\n" | sfdisk "${DISK}"
|
||||
part_boot="${DISK}1"
|
||||
part_root="${DISK}2"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue