unifi-utilities / unifios-utilities

A collection of enhancements for UnifiOS based devices

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

[BUG] ERROR: No persistent storage found.

bslatyer opened this issue · comments

Describe the bug
Attempting to install the 2.x on_boot script via cURL results in the following error
ERROR: No persistent storage found.

To Reproduce
Steps to reproduce the behavior:

  1. Access the UDM-SE via SSH
  2. Run the following script curl -fsL "https://raw.githubusercontent.com/unifi-utilities/unifios-utilities/HEAD/on-boot-script-2.x/remote_install.sh" | /bin/sh
  3. Results in the above error

Expected behavior
The script is meant to run without errors.

UDM Information

  • Device: UniFi Dream Machine SE (UDM-SE)
  • Firmware Version: UniFi OS 4.0.3 (EA)
  • Controller Version: 8.1.127 (EA)

Additional context
Manually installing the udm-boot-2x_1.0.1_all.deb via SSH works as expected

The installer script expects you to have an HDD installed, it does not consider the onboard SSD to be "persistent" storage as Ubiquity could overwrite that storage at any time.

It's because the install script hasn't been updated to reflect Unifi OS 4.0.3

specifically the first few lines of remote_install.sh are this:

# Get DataDir location
DATA_DIR="/data"
case "$(ubnt-device-info firmware || true)" in
1*)
  DATA_DIR="/mnt/data"
  ;;
2*)
  DATA_DIR="/data"
  ;;
3*)
  DATA_DIR="/data"
  ;;
*)
  echo "ERROR: No persistent storage found." 1>&2
  exit 1
  ;;
esac

the command ubnt-device-info firmware outputs 4.0.3 so it matches the * which then exits the script.