mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-04-09 20:29:19 +02:00
#271 option to create partition
This commit is contained in:
parent
cbfea64289
commit
d8c90d4c6e
@ -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
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user