fix storage format

This commit is contained in:
rootzoll
2025-01-17 23:19:41 +01:00
parent cddb12555c
commit 68c1e18e9b
2 changed files with 17 additions and 1 deletions

View File

@@ -607,6 +607,7 @@ if [ "${scenario}" != "ready" ] ; then
# add info if a flag shows that install medium was tried before
if [ -f "/home/admin/systemcopy.flag" ]; then
/home/admin/_cache.sh set "system_setup_secondtry" "1"
rm /home/admin/systemcopy.flag
else
/home/admin/_cache.sh set "system_setup_secondtry" "0"
fi
@@ -711,7 +712,7 @@ if [ "${scenario}" != "ready" ] ; then
/home/admin/_cache.sh set message "copying system"
# STORAGE
if [ ${#storageDevice} -gt 0 ] && [ "${storageMountedPath}" = "0" ]; then
if [ ${#storageDevice} -gt 0 ] && [ ${#storageMountedPath} -eq 0 ]; then
/home/admin/_cache.sh set message "Init STORAGE Drive"
error=""
source <(/home/admin/config.scripts/blitz.data.sh setup STORAGE "${storageDevice}" "${combinedDataStorage}" "${bootFromStorage}")

View File

@@ -87,6 +87,21 @@ if [ "${setupPhase}" == "migration" ]; then
fi
############################################
# Fix: BOOT ORDER CHANGE FAILED
source <(/home/admin/_cache.sh get system_setup_secondtry)
if [ "${system_setup_secondtry}" == "1" ]; then
whiptail --title " BOOT ORDER CHANGE FAILED? " --msgbox "
You already ran a setup/recover and copied the system to SSD/NVMe. But it booted again from the old install medium. To fix it:
Press OK
Wait until shutdown.
Remove install medium.
Power up again." 16 50
sudo shutdown now
exit 1
fi
# fresh import setup values
source /home/admin/raspiblitz.info