Skip to content

Instantly share code, notes, and snippets.

@derjohn
Last active November 3, 2023 11:19
Show Gist options
  • Save derjohn/45f6a0dde68ee79af57b36ce9462f7d6 to your computer and use it in GitHub Desktop.
Save derjohn/45f6a0dde68ee79af57b36ce9462f7d6 to your computer and use it in GitHub Desktop.
Resurrect a Conelcom Controllino Helum Miner that _only_ listens to port 22222/ssh
#!/bin/sh
# This can only be done if the device is accessible via ssh on port 22222.
# (so, usually only Nebra can do that or you have to open the controllino and inject your ssh pubkey to /boot/config.json)
# Obviouly portr 22222 must be reachable from internet, because the management VPN is also stuck
# default looks like
# "os": {
# "sshKeys": [
# "ssh-ed25519 AAAAC3NzaC1lZDI1NTE5AAAAIDKeee0Y4o4QhVudeJ4I8Ol4idvYXlEkzxNrU1DWDkeZ",
# ]
# },
#
# The controllino to Nebra firmware upgrade got stuck in the begnning of 2023, it did never complete.
# The cause is that the name of resin-supervisor changed to balena-supervisor when
# balena changed it product name from resin to balena. So it's more or less Balena's fault.
# The supervisor does not get healthy, because it the version deployed looks for a container called "resin-supervisor".
# That does not exist anymore because the name is "balena-supervisor"
# The solution is to clean up old containers and pull a newer version of the supervisor manually with the device shell:
# root@controllinohotspotv1:~# /usr/bin/update-balena-supervisor -i registry2.balena-cloud.com/v2/8f3d658a373039a9c27b8f1811b0261d
# Getting image name and version...
#...
#6abae437c3b5: Pull complete
# clean up old containers and free space
balena rm -f $(balena ps -a -q)
# update the supervisor
/usr/bin/update-balena-supervisor -i registry2.balena-cloud.com/v2/8f3d658a373039a9c27b8f1811b0261d
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment