balena os configure issues

So I’ve been a balenaCloud user for quite some time and wanted to explore openBalena with all my newly found free time being stuck at home. Today I got my server setup, URL etc and that all seems to be good. I setup Balena CLI on my windows machine, but then discovered that you cant configure an img from a windows computer for a Raspberry PI. So I setup a Ubuntu WSL instance, Balena CLI is setup and seems to be working fine for basic login, add app etc commands. I’m to the point where I’m trying to configure the image and I keep hitting road blocks after I downloaded a base image from Balena.

First I try this command, pretty identical to the example in the getting started and get an error about the OS version
balena os configure /usr/local/downloads/balenaos-raspberrypi3-2.47.0+rev1-dev-v10.6.27.img --app MyAppName

Could not read OS version from the image. Please specify the balenaOS
version manually with the --version command-line option.

I didn’t see much in the help, so I just kind of guessed with this command and get an error about using sudo
balena os configure /usr/local/downloads/balenaos-raspberrypi3-2.47.0+rev1-dev-v10.6.27.img --app MyAppName --version 10.6.27

You don’t have sufficient privileges to run this operation.
Try running this command again prefixing it with sudo.

I drop sudo in front of the command, put in the password, and then get command not found
sudo balena os configure /usr/local/downloads/balenaos-raspberrypi3-2.47.0+rev1-dev-v10.6.27.img --app MyAppName --version 10.6.27
[sudo] password for user:
sudo: balena: command not found

I’m a little stumped, I’d guess most of it is from my limited Ubuntu experience, but I figured I’d stick it on the forums while I keep poking around on google trying to find my way through things. If anyone can point me in the right direction I’d greatly appreciate it! Looking forward to experimenting with openBalena.

10.6.27 is the Supervisor version and what the command expects is the OS version, which is 2.47.0+rev1 for your image. Can you try again? You’ll also probably need to fully specify the path to balena, eg. /usr/bin/balena to get past that “command not found” error when using sudo.

Thanks for that. Was I using the --version command correctly? It seems like something like that should be mentioned in the getting started if it’s needed. This is the example from the getting started “balena os configure ~/Downloads/balenaos-raspberrypi3-2.22.1+rev1-dev-v7.25.3.img --app myApp”

For the sudo issue I ended up getting it to work with this command if someone has the same issue later on. The device booted into the app, so I think atleast that road bump is done.

sudo -E env “PATH=$PATH” balena os configure /usr/local/downloads/balenaos-raspberrypi3-2.47.0+rev1-dev-v10.6.27.img --app MyAppName --version 2.47.0+rev1

Hi Cody, usually the version is extracted from the image, so it is only needed if it was not possible to extract it from the image as it is your case. The “os configure” command help is accessible if you do:

balena os configure --help

And the version argument is explained to be the balenaOS version.
About sudo, the balena command needs to be in the path when executed by sudo. Your workaround works fine, as is a symlink from the balena executable to a location inside the path sudo is using.

1 Like