mirror of
https://github.com/raspiblitz/raspiblitz.git
synced 2025-10-09 20:32:52 +02:00
Display Dialog before formatting HDD/SSD
This commit is contained in:
6
FAQ.md
6
FAQ.md
@@ -833,3 +833,9 @@ There is an experimental script to connect the RaspiBlitz to a UPS over USB cabl
|
|||||||
To turn it on run from terminal: `/home/admin/config.scripts/blitz.ups.sh on apcusb`
|
To turn it on run from terminal: `/home/admin/config.scripts/blitz.ups.sh on apcusb`
|
||||||
|
|
||||||
If you have other UPS models or ways to connect ... feel free to extend this script.
|
If you have other UPS models or ways to connect ... feel free to extend this script.
|
||||||
|
|
||||||
|
## How to recover a BTRFS partition?
|
||||||
|
|
||||||
|
This articles goes thru the usual options:
|
||||||
|
https://ownyourbits.com/2019/03/03/how-to-recover-a-btrfs-partition/
|
||||||
|
https://seravo.fi/2015/using-raid-btrfs-recovering-broken-disks
|
@@ -104,15 +104,22 @@ if [ ${hddGotBlockchain} -eq 0 ]; then
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
# now partition/format HDD
|
# now partition/format HDD
|
||||||
echo
|
echo
|
||||||
echo "# --> Formatting HDD/SSD ..."
|
if (whiptail --title "FORMAT HDD/SSD" --yesno "The connected hard drive needs to get formatted.\nIMPORTANT: This will delete all data on that drive." 8 56); then
|
||||||
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh format ${format} ${hddCandidate})
|
clear
|
||||||
if [ ${#error} -gt 0 ]; then
|
echo "# --> Formatting HDD/SSD ..."
|
||||||
echo "# FAIL blitz.datadrive.sh format --> ${error}"
|
source <(sudo /home/admin/config.scripts/blitz.datadrive.sh format ${format} ${hddCandidate})
|
||||||
echo "# Please report issue to the raspiblitz github."
|
if [ ${#error} -gt 0 ]; then
|
||||||
|
echo "# FAIL blitz.datadrive.sh format --> ${error}"
|
||||||
|
echo "# Please report issue to the raspiblitz github."
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
else
|
||||||
|
clear
|
||||||
|
echo "# Not formatting the HDD/SSD - Setup Process stopped."
|
||||||
|
echo "# Rearrange your hardware and retstart with a fresh sd card again."
|
||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
@@ -138,10 +138,10 @@ if [ "$1" = "status" ]; then
|
|||||||
sudo mkdir -p /mnt/storage
|
sudo mkdir -p /mnt/storage
|
||||||
if [ "${hddFormat}" = "btrfs" ]; then
|
if [ "${hddFormat}" = "btrfs" ]; then
|
||||||
# in btrfs setup the second partition is storage partition
|
# in btrfs setup the second partition is storage partition
|
||||||
sudo mount /dev/${hdd}2 /mnt/storage
|
sudo mount /dev/${hdd}2 /mnt/storage 2>/dev/null
|
||||||
else
|
else
|
||||||
# in ext4 setup the first partition is also the storage partition
|
# in ext4 setup the first partition is also the storage partition
|
||||||
sudo mount /dev/${hdd}1 /mnt/storage
|
sudo mount /dev/${hdd}1 /mnt/storage 2>/dev/null
|
||||||
fi
|
fi
|
||||||
isTempMounted=$(df | grep /mnt/storage | grep -c ${hdd})
|
isTempMounted=$(df | grep /mnt/storage | grep -c ${hdd})
|
||||||
if [ ${isTempMounted} -eq 0 ]; then
|
if [ ${isTempMounted} -eq 0 ]; then
|
||||||
|
Reference in New Issue
Block a user