Better disk device picker

This commit is contained in:
Fierelier 2022-08-26 08:54:16 +02:00
parent d4dc7a71cb
commit 191c121e12

View File

@ -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 ..."