From d8c90d4c6ecedbd75ca31d923c405bf3a266716d Mon Sep 17 00:00:00 2001 From: rootzoll Date: Tue, 15 Jan 2019 14:50:33 +0100 Subject: [PATCH] #271 option to create partition --- home.admin/00mainMenu.sh | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/home.admin/00mainMenu.sh b/home.admin/00mainMenu.sh index a48760c..c0932d7 100755 --- a/home.admin/00mainMenu.sh +++ b/home.admin/00mainMenu.sh @@ -13,11 +13,12 @@ if [ ${hddExists} -eq 0 ]; then # check if there is maybe a HDD but woth no partitions noPartition=$(lsblk | grep -c sda) - if [ ${hddExists} -eq 0 ]; then - echo "***********************************************************" - echo "WARNING: HDD HAS NO PARTITIONS -> see FAQ:" - echo "https://github.com/rootzoll/raspiblitz/blob/master/FAQ.md#what-to-do-if-my-hdd-has-no-partitions" + if [ ${noPartition} -eq 1 ]; then echo "***********************************************************" + echo "WARNING: HDD HAS NO PARTITIONS" + echo "Press ENTER to create a Partition - or CTRL+C to abort" + read key + sudo parted -s /dev/sda unit s mkpart primary `sudo parted /dev/sda unit s print free | grep 'Free Space' | tail -n 1` exit fi