Hey,
i´m new to Home Assistant and linux in general and i´m trying to install HA on my raspbarry pi 2b on raspberry pi os lite.
i´ve followed the guides on GitHub and a couple videos on youtube but whatever i´m trying, i´m running in an error. Tried various versions of os-agent and raspberrypi os.
All needed is installed and everything runs fine until i have to install os-agent. Trying to configure or repair doesn´t help, so i´m here.
root@raspberrypi:~# sudo dpkg -i os-agent_1.4.1_linux_armv7.deb
Selecting previously unselected package os-agent.
(Reading database ... 44131 files and directories currently installed.)
Preparing to unpack os-agent_1.4.1_linux_armv7.deb ...
Unpacking os-agent (1.4.1) ...
Setting up os-agent (1.4.1) ...
Created symlink /etc/systemd/system/multi-user.target.wants/haos-agent.service → /lib/systemd/system/haos-agent.service.
Job for haos-agent.service failed because a fatal signal was delivered to the control process.
See "systemctl status haos-agent.service" and "journalctl -xe" for details.
dpkg: error processing package os-agent (--install):
installed os-agent package post-installation script subprocess returned error exit status 1
Processing triggers for dbus (1.12.24-0+deb11u1) ...
Errors were encountered while processing:
os-agent
This is what i get after i´m trying to install.
root@raspberrypi:~# sudo apt-get -f install
Reading package lists... Done
Building dependency tree... Done
Reading state information... Done
0 upgraded, 0 newly installed, 0 to remove and 0 not upgraded.
1 not fully installed or removed.
After this operation, 0 B of additional disk space will be used.
Setting up os-agent (1.4.1) ...
Job for haos-agent.service failed because a fatal signal was delivered to the control process.
See "systemctl status haos-agent.service" and "journalctl -xe" for details.
dpkg: error processing package os-agent (--configure):
installed os-agent package post-installation script subprocess returned error exit status 1
Errors were encountered while processing:
os-agent
E: Sub-process /usr/bin/dpkg returned an error code (1)
And this after i´m trying to repair.
Rebootet often, reinstalled everthing, updated everthing but nothing works. Hopefully i can find some help here, if needed, i can provide the logs. Thanks
Instructions on YouTube go out of date fairly quickly. Also a Pi 2b is fairly underpowered for HA, especially if you are going to do more than have a play. I assume you were trying to do a HA Supervised install. There are caveats for doing that including a very short list of supported OS.
There are instructions for various install methods here:
If all you have is your Pi and a PC and you just want to try HA out, I would personally go for a HAOS install on a VM. The instructions are in the Linux section, but you can run your VM up on any environment including Mac and Windows.
I was doing the supervised install, done like in the instruction you mentioned.
My plan ist to try if it works at all, so i don´t have to buy a new raspberrypi for high scalped prices. For now i want to connect about 5 devices and run a couple of routines and that should be fine.
I´m not able to get around these error´s. Also i tried to install haos but it didn´t even boot. I just need some solution to install os-agent and fix the error.
The Supervised installer isn’t supported on that OS and you will have problems.
Why not simply use Home Assistant OS? There’s images for the Pi2 and you’ll save all this trouble, and all the future trouble you’re going to have when HA breaks because you’re not using actual Debian.
I´ve tried to install Home Assistant OS, even diffrent versions but if i try to start the raspberry it doesn´t boot, like there´s no sd card. But i´ll try it one more time tomorrow.
Thanks for your help so far.
To conclude your initial problem about why installing os-agent on a RPI2 is failing:
Note the processor architecture: You tried to install os-agent for armv7 on a armv6 cpu.
As Tinkerer has already pointed it out there is no os-agent for the armv6 processor architecture. Thus os-agent simply can not be installed on your system.
Regarding the inability to boot a fresh Home Assistant OS from SD card try again by connecting the USB card reader to a USB2-port (but not to a USB3 port) on your PC/Mac for writing the image to the card. I have had similar situations where writing an image to a SD-card seemingly went just fine but a RPI4 was unable to boot from it. Using a USB2 port when writing the image to SD helped in my case. Worth a try.
Now i understand, thank you.
So i will try to install HA-OS to another SD over a usb2.0 port and if it still doesn´t boot i could try to install debian with armv7 kernel, am i right?
You can try to install install Debian 11 (bullseye) instead of the backwards compatible Rasbian on your RPI2 to get that armv7 support. But be aware that you should have some decent Linux exerience if you choose the Supervisor installation method or you might just suffer and wasting valuable time.
I really recommend to start with Home Assistant OS. After you feel more comfortable in managing a Linux system you can still switch to HA Supervised.
Please let us know whether writing the image to the SD card over a USB2 port remedies the boot problems you are experiencing.
I´ve found a guide to with a “modded” os-agent armv6 file, installed it and it works. Gonna try to install HA now.
Maybe i gain some Linux experience from this, and i wasted already enough time so it doesn´t matter if it´s a bit more haha
Most probably you will get that infamous “System is unhealthy”-state and updates will fail. Also note that the patched os-agent is based on os-agent v.1.2.2 which is quite outdated (the actual version is 1.4.1).
I am not so sure whether forcing this is worth the effort (and time)
So it´s now about 20 min in and the HA page is still not reachable. Via “htop” i see that docker/HA is using lots of resources so i´ll wait… I don´t think i will run it for long in this state but now it´s for me just proof of concept.
Just for context, i´m remoted into my pc at home, so i´m not able to take out the sd and try HA-OS or others.
Danke Tamsy
edit:
HA is still not accessable, so i´m gonna stop it here. Tomorrow comes a fresh install of HA-OS
Multiple SD cards, usb2.0, usb3.0, diffrent versions, diffrent install methods (rufus, RaspberryPiImager, etcher over url and file) and nothing works.
Everytime i get two blinks from the act led, one normal blink, one fast blink and then it´s stuck. Partitionsmanager shows two partitions, one large blank and another 32mb sized, where just 8.45mb are used. (i would think there should be more data on it)
Next i try run it on Debian armv7.