alexbelgium / hassio-addons

My homeassistant addons
MIT License
1.56k stars 223 forks source link

🐛 [qBittorrent , Jellyseerr, Lidarr , Radarr , FlareSolver , Prowlarr , Jellyfin NAS] <running any hassio-addons will cause HA not to boot after restart.> #1600

Closed venci1ty closed 1 week ago

venci1ty commented 1 month ago

Description

My Healthy HA started having this problems after i started using any of these addons.
If i click on Reboot system i will have my RPi5 boot looping. I am running it on SD card. I know its from these addons because if i turn on any other official addon and try restarting HA , then HA boots fast and easy.

If i turn on any of these hassio-addons (even no start on boot) and reboot the system , then the problem will come back. Only thing its fixing it is cold boot. Otherwise i can have the addons running without problem after cold boot.

photo_2024-10-10_18-21-05

Reproduction steps

1. Go to 'Start addon'
2. Click on 'Reboot system'
3. Scroll down to '....'
4. See error

Addon Logs

Raspberry Pi 5 - 4GB
bootloader: 4c845bd3 2024/02/16

board: c04170 4f6ba9f0 2c:cf:67:3f:7d:d8
boot: mode USB-MSD 4 order f41 retry 0/128 restart 20/-1
SD: card detected 001b534d4644345139306d065603a181
part: 0 mbr [0xee:00000001 0x00:00000000 0x00:00000000 0x00:00000000]
power: supply: RPi USB-PD 5000 mA CC1 PMIC: reset normal 0x0 usb_over_current=0
net: down ip: 0.0.0.0 sn: 0.0.0.0 gw: 0.0.0.0
tftp: 0.0.0.0 00:00:00:00:00:00
display: DISPO: HDMI HPD=1 EDID=ok #2 DISP1: HPD=0 EDID=none #0

USB2 root HUB port 2 init
USB MSD stopped. Timeout: 25 seconds
Boot mode: RESTART (0f) order 0
Boot mode: SD (01) order f4
Trying partition: 0
type: 16 lba: 2048 'mkfs.fat' ' V
Trying partition: 0
type: 16 lba: 2048 'mkfs.fat' ' V
Trying partition: 0
type: 16 lba: 2048 'mkfs.fat' ' v
Trying partition: 0
type: 16 lba: 2048 'mkfs.fat' ' V
Boot mode: USB-MSD (04) order f
USB2[2] 000206e1 connected
USB2[2] 00200603 connected enabled
USB2 root HUB port 2 init

^ ' clusters 32695 (4)

^' clusters 32695 (4)

A ' clusters 32695 (4)

A ' clusters 32695 (4)

Architecture

No response

OS

HAos

alexbelgium commented 1 month ago

Hi, and you don't have this issue with other third party add-ons? If you don't configure to run on boot there is no reason that they should interfere with HA loading... You could add an automation to start them after cold boot as a mitigation

In any case this is an issue you should raise with ha os github I'm sorry I don't think i can help you more

venci1ty commented 1 month ago

HI, with other third party add-ons i have no issues. If i make them to run on boot, they will start normally (after cold boot) . But if the add-on was turn on before the reboot , my reboot will not be successful.

Why do you think its HA issue ? Not trying to argue , just curiosity. In any case i will raise the issue there as well.

Thanks

alexbelgium commented 1 month ago

Because the screenshot you show hasn't even started Homeassistant itself but seems blocked at hardware boot. Add-ons are started by HA through a docker instance that needs first the os to boot.

Also, even if the add-on fail HA should be able to isolate it. If really there was an issue with an add-on, the os should be able to isolate it as docker normally does.

Last, they are built using the described methodology from their repo and there should be no specificities on those add-ons (except perhaps their size or memory usage) that could prevent them to run

ExquisiteMetropolis commented 1 month ago

This looks like an USB storage issue to me. Are you sure there is enough power provided to your USB storage device? I had this in the past as well and fixed it by connecting my USB SSD disk to an USB powered hub. The Pi itself wasn't able to provide sufficient power to the drive + some other USB devices I connected.

venci1ty commented 1 month ago

Hi , i am booting from SD card , not from USB . Although in near future that would change. Also it really only happens if i have started any of these addons before restart. I am using the recommended usb C power for rpi5 .

ExquisiteMetropolis commented 1 month ago

The screenshot shown, shows the initial boot phase of your raspberry pi.

Seems like you loose boot time because it first attempts to boot an USB drive for 25 secs. Did you configure the bootloader to skip USB if you only use an SD card? I don't see the detection of your SD card in the screenshot/log. Sidenote: your bootloader isn't the most recent one.

`

check bootloader

vcgencmd bootloader_version

update bootloader

sudo apt install rpi-eeprom `

The screenshot has nothing to do (yet) with Home Assistant or any add-on. Comparable with the BIOS/pre-OS boot of your c/laptop.

That's where you need to investigate this issue. It might be the case that your SD card has some kind of issue/bad sector/about to die. Or something went wrong when creating the SD card/sector allocation issue, etc. It's not a home assistant issue or add-in problem. That's something called co-incidence. ;)

Other things you can try is to disconnect any/all other devices. Boot without SD card. Increase the log level at boot of your pi, etc. But nothing you should be asking/troubleshooting here. Many other topics/places on Google where you can find help on this topic/issue.

Personally: I wouldn't recommend running HA on an SD card at all. On the Pi5, get the NVME-HAT and use an NVME SSD. Beter than USB SSD.

github-actions[bot] commented 1 month ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

venci1ty commented 3 weeks ago

hi, thanks for your reply.

Actually i did remove the sd card and put nvme SSD with HAT. updated firmware and all and now is running smoothly until..... A day ago after restart (test restart) the Pi didnt boot again.....

btw these comands i ran on rpOS and then installed HA from there. Thats how i suppose to do it right ? Do i need additional configuration in HA ? Thanks

github-actions[bot] commented 2 weeks ago

This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.