For all commands below, if OS is v2.78.0 or newer, replace resin-supervisor
with balena-supervisor
. See: https://github.com/balena-os/meta-balena/blob/master/CHANGELOG.md#v2780
cat /etc/resin-supervisor/supervisor.conf
should show corrupted file.- Verify no other files are corrupt with
grep -v "/var/cache/ldconfig/aux-cache" /resinos.fingerprint | md5sum --quiet -c -
See: https://www.balena.io/docs/learn/more/masterclasses/device-debugging/#112-storage-media-corruption - Note last reboot time and when the device was observed to stop working (i.e. Supervisor could not start), notify support agents if possible
- From the dashboard page, open Chrome / Firefox developer's console with Ctrl/Cmd + Shift + I. Run the following:
let uuid = 'REPLACE_ME_WITH_DEVICE_UUID';
await sdk.models.device.get(uuid, { $select: ['is_ofdevice_type', 'should_be_managed_bysupervisor_release', 'supervisor_version'], $expand: 'should_be_managed_bysupervisor_release' })
.then((result) => {
let targetSupervisor = result.should_be_managed_bysupervisor_release.filter(release => release.is_fordevice_type.id === result.is_ofdevice_type.id);
return { target: targetSupervisor[0], current: result.supervisor_version }
})
- This step depends on whether target in the result is undefined or not
a. If target is defined, grab
image_name
from the result. This will be the value of SUPERVISOR_IMAGE later on. The value of SUPERVISOR_TAG will belatest
. b. If undefined, runbalena images | grep 'supervisor'
in a host OS terminal:
root@252e214:~# balena images | grep 'supervisor'
balena/aarch64-supervisor v12.2.11 1f14799a438b 12 months ago 72.3MB
In this case, the value of SUPERVISOR_IMAGE is balena/aarch64-supervisor
and the value of SUPERVISOR_TAG is v12.2.11
.
3. On your dashboard, if the "blink" action is available (there is a lightbulb button), the value of LED_FILE will be /sys/class/leds/led0/brightness
. If no button is available, it will be /dev/null
.
4. rm /etc/resin-supervisor/supervisor.conf; vi /etc/resin-supervisor/supervisor.conf
5. Paste the following, replacing the fields with the data you acquired in the previous steps:
# This file represents the last known version of the supervisor
SUPERVISOR_IMAGE=REPLACE_ME
SUPERVISOR_TAG=REPLACE_ME
LED_FILE=REPLACE_ME
Run update-resin-supervisor
if the Supervisor doesn't automatically update and start running.