Boot message: “Waiting for the Home Assistant CLI to be ready…”

Hi,

I’ve been running HA on a Raspberry Pi for nearly 6 months now. During that time I’ve applied a few updates when prompted from the HA GUI. Today after one of those updates, HA os i think, the system won’t restart.

There are some orange warnings during startup but they whizz past before i have anychane of reading before the screen clears to just display “Waiting for the Home Assistant CLI to be ready…”

No prompt or apparently any way to access anything.

Searching i see a few references to this symptom, but no answers.

Is there likely to be a fix, or does it have to be reinstalled from scratch?

Thanks.

Connect a monitor and keyboard. See if you can boot into Safe mode: General troubleshooting - Home Assistant.

There may be some info in the system logs. See #5 here: How to Troubleshoot Raspberry Pi Crashing.

Thanks. It won’t go into safe mode, from the # prompt after logging in as root, none of the “ha” commands do anything, the cursor just moves to the start of the next line and sits there indefinitely.

IP is working, I can ping it from our network either by IP or by DNS hostnane. And from the Pi # prompt I can ping out again either by address or name. For example it gets a reply from www.cisco.com.

Just mentioning because some of the suggestions I turned up revolved around network or DNS settings.

I’ve concluded it’s completely corrupted. Not the SD card itself because all the partitions and directories are readable, but none of the paths mentioned in troubleshooting advice exist and none of the suggested commands work.

I’ve just reinstalled from scratch.

I recommend regular backups if you are not doing so already. Makes recovery easier.

Disaster Recovery Planning.

Thanks, I’ve installed and configured the Backup to Google Drive integration. Need to configure an automatic schedule, but at least I now have easy off-box backup on demand.

I need to be more cautious about HA or OS updates, don’t do them except when I’m ready for a rebuild.

That applies to any upgrade - not just Home Assistant. Also a good idea to test your recovery process before you need it.

I am not an expert but did find some information. Steps I took:
Opening a new terminal (Ctrl+Alt+F2) and logging in using root user.
Checked the status of all available docker containers:
docker ps -a

There I noticed only my hassio_supervisor and hassio_observer were ‘running’, the rest had an EXITED status and (mostly) my homeassistant-container had status EXITED(0).
I tried a lot of the suggested fixes I found online, without any working.

Luckily I have a DevOps colleague that could debug a bit further and we found out that the supervisor container got corrupted.

docker start homeassistant since it could not start automatically (also started hassio_cli, -dns, etc. as found using docker ps -a)
docker inspect homeassistant / tmp/output.txt to write the logs to a readable file
vi /tmp/output.txt to read the logs and find out it broke on some internal IP address that should have been set in the supervisor container.
docker logs hassio_supervisor

The last one revealed the actual issue was a Exec format error in the supervisor container!

Supervisor does not start: Exec format error · Issue #5004 · home-assistant/supervisor · GitHub implies (to me) that I will just need to reinstall everything.
But I was able to copy all data from my SSD that I was running homeassistant on, using DiskInternals Linux Reader.
The directive mnt/data/supervisor/backup still contained a back-up with all my homeassistant configuration.

I hope any of this makes sense and helps others in the future.

HOWEVER!
While typing this all, I think I fixed it by simply stopping the supervisor container and then rebooting… docker stop supervisor took some time, but seemed to do the trick?