From 191c121e120c9b5fb1775fc44f8f3b90cc96d871 Mon Sep 17 00:00:00 2001 From: Fierelier Date: Fri, 26 Aug 2022 08:54:16 +0200 Subject: [PATCH] Better disk device picker --- mods/live-installer/data/bin/login | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) diff --git a/mods/live-installer/data/bin/login b/mods/live-installer/data/bin/login index 3e0e4e7..f132cb4 100755 --- a/mods/live-installer/data/bin/login +++ b/mods/live-installer/data/bin/login @@ -43,8 +43,19 @@ while true; do udevadm trigger --subsystem-match=input --action=change service keyboard-setup.sh restart - lsblk - read -p "Device (ALL DATA WILL BE ERASED): " DEVICE + YN="n" + while [ "$YN" == "n" ]; do + echo "" + lsblk -d -o PATH,SIZE + read -p "Device: " DEVICE + echo "" + lsblk "$DEVICE" -o NAME,SIZE,FSTYPE,PARTLABEL + read -p "All data on this disk will be erased! Continue? [y,n]: " YN + YN="$(echo "$YN" | tr "[:upper:]" "[:lower:]")" + if [ "$YN" != "y" ]; then + YN="n" + fi + done # Create partitions echo "Creating partitions ..."