I am trying to run balena engine on regular raspbian system on RaspberryPi 3B. Everything is up to date. Balena engine was installed using the script from home page, it’s the latest version v20.10.19. Script has finished successfully.
curl -sfL https://balena.io/engine/install.sh | sh
Running the balena-engine and the daemon results in error Illegal instruction. It’s the only message I get. Bunch of other executables were introduced during install, but all of them result with the same message.
Hello @Rafal first of all welcome to the balena community! This is great that you are trying to run balenaEngine on your raspbian system!
When you installed balenaEngine did you get the message Installation successful!? Did you follow these instructions?
To use balenaEngine you need to start balena-engine-daemon as a background process.
This can be done manually or using the init system scripts provided here:
https://github.com/balena-os/balena-engine/tree/$tag/contrib/init
This requires adding a \"balena-engine\" group for the daemon to run under:
sudo groupadd -r balena-engine
If you want to allow non-root users to run containers they can be added to this group
with something like:
sudo usermod -aG balena-engine <user>
WARNING: Adding a user to the \"balena-engine\" group will grant the ability to run
containers which can be used to obtain root privileges on the
docker host.
Refer to https://docs.docker.com/engine/security/security/#docker-daemon-attack-surface
for more information.
Please, let us know the step-by-step that you did please to have more information!
Yes, the installation was successful. I did follow those steps, however I don’t think it matters much, since .service tries to run executable, which fails even when ran manually. System was not modified in any way and can be considered clear install + update of apt-get packages.
Hi @rafal ! Thanks for reporting this – and sorry that you are going through this issue!
I’d say this is a bug in our installation script. In summary, the installer is downloading the armv7 version of balenaEngine (because that’s what uname -m reports), but everything in Raspberry Pi OS is set up for running software compiled for armv6. I created a GitHub issue to track this.
As a workaround, please go to the balena releases page on GitHub and download a release for armv6l. Then replace /usr/local/bin/balena-engine-dev with the one from the armv6l package you downloaded. This shall get rid of the Illegal Instruction error.
Also, there’s one more hiccup you’ll probably find next: the current version of balenaEngine do not yet support cgroups v2, so you’ll need to configure Raspberry Pi OS to use cgroups v1. To do that, just append systemd.unified_cgroup_hierarchy=0 to the end of the /boot/cmdline.txt in your Pi and reboot.
I did a quick test here and these steps worked for me. Please let us know if they work for you too, or if you need any further help. And again, apologies for the trouble!
Mind to share a little bit about what you are doing and why you chose to use balenaEngine? I don’t see many people using balenaEngine outside of balenaOS. Would love to hear about your use case or experiments you are doing!
Sure. Long story short: I am exploring containers and orchestration (balena engine and k3s) in IoT. Bascially what you’re doing in Balena, but for educational purposes