unifi-utilities / unifios-utilities

A collection of enhancements for UnifiOS based devices
GNU General Public License v3.0
3.86k stars 415 forks source link

[BUG] ERROR: No persistent storage found. #602

Closed bslatyer closed 2 months ago

bslatyer commented 2 months ago

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

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

GalenOfTheShadows commented 2 months ago

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.

cachrisman commented 2 months ago

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.

shirt-dev commented 2 months ago

I believe https://github.com/unifi-utilities/unifios-utilities/blob/main/cni-plugins/05-install-cni-plugins.sh needs to be updated as well

boostchicken commented 2 months ago

I believe https://github.com/unifi-utilities/unifios-utilities/blob/main/cni-plugins/05-install-cni-plugins.sh needs to be updated as well

Done