Skip to content

Instantly share code, notes, and snippets.

@Grayda
Last active August 29, 2015 14:21
Show Gist options
  • Select an option

  • Save Grayda/cc9247cdce87615c0f0d to your computer and use it in GitHub Desktop.

Select an option

Save Grayda/cc9247cdce87615c0f0d to your computer and use it in GitHub Desktop.
Error codes from recovery.sh
Extracted from https://github.com/ninjasphere/sphere-factory-reset/blob/cba5514d118bd9bf8df8825acd2e380a9deea8e1/ninjapack/root/opt/ninjablocks/factory-reset/bin/recovery.sh using these Regexs:
^((?!progress).)*$
^((?!ERR).)*$
progress "0040" "Writing partition table..."
progress "0043" "Partition table write was successful."
progress "0042" "Partition table update failed - $?."
progress "0044" "Probing '$drive' partition table..."
progress "0047" "Partition table probe of '$drive' completed successfully."
progress "0046" "Partition table probe of '$drive' has failed - a reboot will happen in 30 seconds unless cancelled required $rc."
progress "0047" "Rebooting..."
progress "0010" "Formatting partition ${block_device}${partition}..."
progress "0019" "Formatting of '${block_device}${partition}' is complete."
progress "0600" "Reimaging '$block_device$partition'..."
progress "0602" "Extraction of tar '$tar' begins..."
progress "0607" "Extraction of tar '$tar' has completed successfully."
progress "0606" "Extraction of tar '$tar' failed."
progress "0699" "Reimaging of '$block_device$partition' has completed successfully."
progress "9000" "Recovery without network commences."
progress "9001" "Ignoring checksum failure..."
progress "9100" "Reimaging of data partition begins..."
progress "9199" "Reimaging of data partition is complete"
progress "9200" "Reimaging of root partition begins..."
progress "9250" "Reimaging of root is complete."
progress "9251" "Removing factory flash settings..."
progress "9252" "Removing factory flash settings has completed - $rc."
progress "9300" "Reimaging of boot partition begins..."
progress "9399" "Reimaging of boot partition ends."
progress "9997" "Reimaging is complete."
progress "8500" "Forcing boot to NAND in recovery mode..."
progress "8501" "Backing up boot partition"
progress "8503" "Blanking boot partition with '${size}' MB of zero."
progress "8599" "Rebooting into NAND..."
progress "8598" "The boot partition has been nuked! Good luck and see you on the other side!"
progress "2500" "Downloading recovery script begins..."
progress "2501" "Downloading ${sha1url}..." &&
progress "2599" "Downloading of '${sha1url}' to '${sha1name}' is complete." &&
progress "2600" "Downloading ${shurl}..." &&
progress "2697" "Downloading of '${shurl}' to '${shname}' is complete." &&
progress "2699" "Downloading of recovery script is complete."
progress "2698" "Downloading of recovery script has failed."
progress "0100" "Verifying checksum of '$file'..."
progress "0199" "Verification of checksum '$file' is complete."
progress "9800" "Manual recovery of boot partition begins..."
progress "9899" "Manual recovery of boot partition is complete."
progress "9700" "Manual recovery of data partition begins..."
progress "9799" "Manual recovery of data partition is complete."
progress "8010" "Stopping udev"
progress "8013" "Unmounting '${mp}'..."
progress "8015" "Unmounting of '${mp}' has succeeded."
progress "8014" "Unmounting of '${mp}' has failed - $?."
progress "8017" "Rewriting partition table..."
progress "8018" "Checking partition table..."
progress "8021" "Trying to remount image partition..."
progress "8023" "Remounting of image partition was successful."
progress "8022" "Remounting of image partition failed. Trying to reformat it..."
progress "8000" "Recovery assuming network exists begins..."
progress "8001" "Checking partition table..."
progress "8002" "Differences found."
progress "8028" "Partitioning required, but deferred until nand boot."
progress "8030" "Downloading '${imagesha1url}' to '${imagesha1}'..."
progress "8031" "Checking '${imagetar}'..."
progress "8032" "Validation of '${imagetar}' failed."
progress "8033" "Downloading '${imageurl}' to '${imagetar}'..."
progress "8034" "Download from '${imageurl}' to '${imagetar}' failed."
progress "8035" "Validation of '${imagetar}' failed."
progress "8039" "Download of '${imageurl}' to '${imagetar}' is complete."
progress "8038" "Download from '${imagesha1url}' to '${imagesha1}' failed."
progress "8100" "Found recovery archive '$imagetar'. Extracting recovery script..."
progress "8105" "Extracted executeble recovery script."
progress "8107" "Unpacked recovery script to '$unpacked'."
progress "8106" "Unpacking failed."
progress "8104" "Could not find executeble recovery script in recovery tar."
progress "8102" "Failed to extract recovery script from recovery tar."
progress "8999" "Recovery assuming network exists ends."
progress "8998" "Recovery assuming network exists ends badly."
progress "0200" "Checking required dependencies..."
progress "0299" "Checking complete."
progress "3050" "Patching wpa_supplicant.conf..."
progress "3059" "Patching wpa is complete..."
progress "3058" "Patching wpa has failed."
progress "3051" "The wpa_supplicant.conf file exists."
progress "3100" "Taking wlan0 down..."
progress "3103" "Taking wlan0 down is complete."
progress "3102" "Taking wlan0 down has failed."
progress "3110" "Bringing wlan0 up (ifconfig)..."
progress "3113" "Bringing wlan0 up (ifconfig) is complete."
progress "3112" "Bringing wlan0 up (ifconfig) has failed."
progress "3230" "Reconfiguring wpa..."
progress "3233" "wpa reconfiguration is complete."
progress "3232" "wpa reconfiguration has failed."
progress "3320" "Bring wlan0 up (ifup)..."
progress "3313" "Bringing up wlan0 up (ifup) is complete."
progress "3312" "Bringing up wlan0 up (ifup) has failed."
progress "3301" "Taking hci0 down..."
progress "3399" "Taking hci0 down is complete."
progress "3398" "Taking hci0 down has failed."
progress "3401" "Bringing hci0 up..."
progress "3499" "Bringing hci0 up is complete."
progress "3498" "Bringing hci0 up failed."
progress "3500" "Launching setup assistant to acquire network credentials..."
progress "3501" "Cycling interfaces before launching setup assistant..."
progress "3503" "Factory setup assistant has exited successfully."
progress "3502" "Factory setup assistant has failed -$?."
progress "3510" "Reconfiguring wpa..."
progress "3513" "WPA configuration was successful."
progress "3512" "WPA configuration was not successful - $?."
progress "3514" "Bring wlan0 down (ifdown) ..."
progress "3515" "Waiting for wlan0 to settle..."
progress "3517" "Waiting for wlan0 to settle..."
progress "3521" "Bringing up ifup wlan0"
progress "3523" "The command 'ifup wlan0' was successful."
progress "3512" "The command 'ifup wlan0' was not successful - $?."
progress "3599" "Resuming recovery..."
progress "3603" "Found other script ('$other') but continuing with ('$self') because of rule ('${RECOVERY_ARCHIVE_DELEGATION_RULE}')"
progress "3609" "Delegating to alternative script '$script'."
progress "3602" "Script phases are disabled by RECOVERY_ENABLE_SCRIPT_PHASES. Using '$0' instead of '$script'."
progress "1000" "Factory reset starts..."
progress "1001" "Checking boot partition..."
progress "1002" "The boot partition is ok. Checking for user reset indication..."
progress "1003" "The user has not disabled reset - reset continues."
progress "1999" "Unforced reset is disabled."
progress "1010" "Launching recovery script '$downloaded'..."
progress "1011" "Failed to download recovery script."
progress "1014" "Failed to locate a valid recovery archive."
progress "1016" "Removing corrupted tar '$tar'."
progress "1018" "Failed to remove corrupted '$tar'."
progress "2000" "First recovery attempt..."
progress "2997" "Recovery attempt failed."
progress "2998" "Skipping setup assistant because 'eth2' device exists."
progress "2001" "Retrying recovery attempt ($count)..."
progress "9998" "Recovery steps complete."
progress "9999" "Recovery command ends."
progress "0300" "Mounting '$device'..."
progress "0399" "The partition '$device' is mounted on '$current'."
progress "0398" "'$device' could not be mounted."
progress "0400" "Unmounting '$device'..."
progress "0499" "'$device' is unmounted."
progress "0498" "'$device' could not be unmounted."
progress "0501" "Mounting image partition."
progress "0502" "Image partition "$(sdcard)p4" cannot be mounted. Reformatting..."
progress "0503" "Image partition formatted. Remounting..."
progress "0504" "Image mounted."
progress "0101" "Patching eth2."
progress "0103" "Patched eth2."
progress "0102" "Patch already applied (eth2)."
progress "0965" "Copying '$sha1' to '$imagedir'..."
progress "0966" "Copying '$sha1' to '$imagedir' has completed successfully." &&
progress "0969" "Erasing files with matching suffix '${suffix}'' from image directory..."
progress "0972" "Copying '$usb' to '$imagedir'..." &&
progress "0975" "Copying '$usb' to '$imagedir' has completed successfully."
progress "0974" "Copying '$usb' to '$imagedir' has failed."
progress "0977" "'$imagedir' already has '$usb' @ '$sha1'"
progress "0976" "Could not find '$sha1' file on USB."
progress "0978" "Could not find '$file' file in USB."
progress "0916" "Failed to update from USB." && false
progress "0921" "Unpacking '${fq_script}'..."
progress "0925" "Unpacking of '${fq_script}' to '$unpacked' has succeeded."
progress "0926" "Unpacking of '${fq_script}' has failed."
progress "0922" "'${fq_script}' is not valid - removing."
progress "0901" "Looking for latest recovery script in /opt/ninjablocks/bin..."
progress "0903" "Found executeable script in /opt/ninjablocks/factory-reset/bin ($timestamp)."
progress "0902" "Could not find factory-reset tree in /opt/ninjablocks/factory-reset."
progress "0910" "Looing for scripts on root partition..."
progress "0913" "Found executeable script in /opt/ninjablocks/bin of $(sdcard)p2"
progress "0915" "Unpacked recovery script as '$found' ($(cat "$found/etc/timestamp"))."
progress "0912" "Could not find executeable script in /opt/ninjablocks/bin of $(sdcard)p2"
progress "0911" "Could not mount root partition..."
progress "0920" "Looking for scripts on image partition..."
progress "0930" "Looking for scripts in archive on image partition..."
progress "0949" "Launching '$latest/bin/recovery.sh' ..."
progress "0948" "Could not find any recovery scripts. Launching '$0'..."
ERR415: usage progress {status-code} {message}
ERR515: Illegal attempt to write partition table to block device when NAND is not mounted.
ERR516: A reboot was required to complete repartitioning but reboots are disabled. Use 'recovery.sh set enable-reboot-on-repartitioning true;'
ERR405: usage: format-partitions {confrmation-code} {block-device} p{partition#}
ERR406: The specified partition device '${partition_device}' does not exist.
ERR521: Failed to format '${partition_device}'.
ERR522: Failed to format '${partition_device}'.
ERR523: Failed to format '${partition_device}'.
ERR524: Failed to format '${partition_device}'.
ERR331: Partition table checksum mismatch. Expected '${PARTITION_TABLE_SHA1SUM}' found '$check'.
ERR410: usage: partition-sha1sum {block-device-or-image}
ERR411: The partition specified by '$block_device' does not exist.
ERR420: usage: confirmed_action {method} {confirmation-code} args...
ERR421: The specified confirmation code '$confirmation' does not match the specified arguments '$*'.
ERR430: usage: wpa_supplicant physical
ERR532: Failed to extract '$tar' to '$block_device$partition'.
ERR441: usage: recovery-without-network {tar}.
ERR442: The specified recovery tar '$tar' does not exist.
ERR535: Unable to delete existing file: '$sha1name'.
ERR536: Unable to delete existing file: '$shname'.
ERR330: The download of the recovery script from '$(url url .sh)' to '$shname' has failed.
ERR555: failed to download recovery script from git.
ERR443: usage: download recovery-script
ERR568: Failed after $max retries.
ERR460: usage: check_file {filename}
ERR301: The specified file '$file' does not exist.
ERR302: The specified '$file' does not have the specified checksum ('$checksum'). Actual checksum: ('$filesum').
ERR511: Unable to unmount boot partition.
ERR512: Could not find backup of boot partition.
ERR561: Failed to update partition table on '$(sdcard)'.
ERR563: Failed to copy '$imagesha1' to '$imagedir'.
ERR310: Failed to download '${imageurl}' to '${imagetar}'.
ERR564: The required recovery archive does not exist: '$imagetar'.
ERR571: The required command 'sfdisk' is available in PATH.
ERR461: usage: check deps
ERR465: usage: interfaces cycle
ERR466: usage tool-path {tool}
ERR567: Unable to locate tool: '${tool}'
ERR320: The clock has a date in the past: $(date "+%Y-%m-%d %H:%M:%S").
ERR341: The required recovery archive '$tar' does not exist or was corrupt.
ERR470: usage mount-point {device}
ERR480: usage: require mounted {partition-device} {mountpoint}
ERR591: Failed to mount '$device' on '$mountpoint'.
ERR481: usage: require unmounted {partition-device}
ERR592: Failed to unmount '$device' from '$current'.
ERR593: This command must only be run when mounted on the NAND
ERR594: This command must only be run when running on a sphere.
ERR594: Failed to mount image device on /tmp.
ERR483: unable to mount image dir
ERR482: usage: require mounted {partition-device} [ {preferred-mount-point} ] | unmounted {partition-device} .
ERR486: usage: set wpa-psk {ssid} {psk}
ERR485: usage:
ERR596: Failed to set '$var'.
ERR490: This command cannot be run while running the sdcard image.
ERR491: This command cannot be run while running the sdcard image.
ERR492: This command cannot be run while running the sdcard image.
ERR496: Failed to update recovery script
ERR493: usage: patch opkg|wpa [{ssid} {psk}]|nand
ERR497: usage get {var}
ERR499: usage: pack {packed-file}
ERR498: 'pack' must be run with bin/recovery.sh in a factory reset tree.
ERR568: Cannot mount '${imagedir}/tmp' on /tmp.
ERR407: usage: with block|large-tmp
ERR408: Unexpected IO during unit test:$(printf " %q" "$@")
ERR409: usage make-recovery-usb {dir} [sphere-stable|sphere-testing|sphere-unstable]
ERR501: Unable to mount large temp device - abandon all hope, ye who enter here!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment