Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bootloop when updating to latest HA OS 11.4 on Raspberry Pi 4 #3059

Closed
dyarfaradj opened this issue Jan 10, 2024 · 42 comments
Closed

Bootloop when updating to latest HA OS 11.4 on Raspberry Pi 4 #3059

dyarfaradj opened this issue Jan 10, 2024 · 42 comments
Labels
board/raspberrypi Raspberry Pi Boards bug stale usb-ssd USB SSD related issue

Comments

@dyarfaradj
Copy link

dyarfaradj commented Jan 10, 2024

Describe the issue you are experiencing

Yesterday when I updated my Raspberry pi 4 8GB with SSD to latest HA OS 11.4 from 11.3 it resulted in a bootloop.
I've tried to restart the Rbpi4 multiple times, I've tried using different USB port for the SSD. I don't have any microHDMI adapter so I can't connect to it.

It's a 256GB SSD and I barely used any space on it, so can't be due to no space left..

What can I do to save the homeassistant configs/files? How can I retrieve a backup from the SSD? Can I read it somehow through my PC?

Is there anything else I can do?

What operating system image do you use?

generic-x86-64 (Generic UEFI capable x86-64 systems)

What version of Home Assistant Operating System is installed?

11.4

Did you upgrade the Operating System.

Yes

Steps to reproduce the issue

  1. Update from 11.3 --> 11,4
  2. bootloop

...

Anything in the Supervisor logs that might be useful for us?

no logs

Anything in the Host logs that might be useful for us?

bo logs

System information

Raspberry Pi 4 8GB (SSD)

Additional information

No response

@dyarfaradj dyarfaradj added the bug label Jan 10, 2024
@sairon sairon added the board/raspberrypi Raspberry Pi Boards label Jan 10, 2024
@sairon
Copy link
Member

sairon commented Jan 10, 2024

The update from 11.3 to 11.4 shouldn't have any effect on Raspberry Pi - the only change reflected in the OS images is #3043 adding a bunch of firmware files, but that hardly makes a difference. What makes you think the device is in bootloop if you have no access to the output? Are you using the SSD as a data disk or as the main system disk?

@dyarfaradj
Copy link
Author

dyarfaradj commented Jan 10, 2024

@sairon
I saw the OS update in HA dashboard and just choose to update it like I've always done.
I'm using the SSD as main system disk.
I know it's a boot loop because of the lights of the ethernetport as well as my SSD. Same pattern and then starts all over again. And it doesn't even connect to my router so I know for a fact its not booted properly.

@foltz61

This comment was marked as off-topic.

@dyarfaradj
Copy link
Author

I managed to connect the SSD to my PC and download the backup files, 4 days old but it's something...

What should I do now? Reflash/reformat the SSD with Homeassistant and then once installed, restore from the backup? Will I get back everything? Like automations, zigbee2mqtt devices etc?

I cba to re-pair everything once again

@leonardpitzu
Copy link

same for me on a pi4 and pi5...
lost quite some work I've done today, before rebooting...

@foltz61
Copy link

foltz61 commented Jan 10, 2024

I managed to connect the SSD to my PC and download the backup files, 4 days old but it's something...

What should I do now? Reflash/reformat the SSD with Homeassistant and then once installed, restore from the backup? Will I get back everything? Like automations, zigbee2mqtt devices etc?

I cba to re-pair everything once again

You'll get everything back as far back as your most recent full backup and any addon backups done after that. If you can see your config folder on the pc I'd copy that also. That way you can manuy restore scripts and automations if necessary. I'm not qualified enough to tell you if you should reinstall and restore yet. Someone may know of a way to get you going without doing that.

@dyarfaradj
Copy link
Author

I managed to connect the SSD to my PC and download the backup files, 4 days old but it's something...
What should I do now? Reflash/reformat the SSD with Homeassistant and then once installed, restore from the backup? Will I get back everything? Like automations, zigbee2mqtt devices etc?
I cba to re-pair everything once again

You'll get everything back as far back as your most recent full backup and any incremental stuff done. If you can see your config folder on the pc I'd copy that also. That way you can manuy restore scripts and automations if necessary. I'm not qualified enough to tell you if you should reinstall and restore yet. Someone may know of a way to get you going without doing that.

Alright, thank you. Yeah I've copied everything, including the homeassistant folder with the config, automations scripts etc just in case..

I'll wait few hours and see if anyone knows how to solve this without having to reinstall and restore.

@foltz61
Copy link

foltz61 commented Jan 10, 2024

Here's my homeassistant.log.1 from a failed boot Not sure if it will help because after it didn't boot correctly I was frequently unplugging and plugging my pi back in.
HassLog.txt

edit:
The log may be from right before I did the update and not a failed boot.

@EnzoD86

This comment was marked as off-topic.

@foltz61

This comment was marked as off-topic.

@sairon
Copy link
Member

sairon commented Jan 11, 2024

In the case of RPi 5 that @EnzoD86 provided the screenshot from, it is most likely broken cmdline.txt, or something in the boot partition - I created a separate issue for that. For the other issues, if the device is stuck in a boot loop, at least a photo of the console output like the above is needed to move forward.

@C0MTRAYA
Copy link

Same here, 11.2 to 11.4 stuck in bootloop or just dont boot anymore. Used my sd clone that ive done last week and it work again, ill do another clone and roll the yerterdays backup on it after work to get everything back.

Using rpi4 4gb.

@foltz61
Copy link

foltz61 commented Jan 11, 2024

I redid my SSD and installed 11.4 on top of a fresh 11.3 flash. Everything went fine. I restored my backup but my zwave stuff wasn't working. I rebooted and was stuck in the bootloop again. I then went back to my working sd from last night. I can only assume that the only reason the sd worked last night is because I didn't reboot after the upgrade to 11.4. I ordered a micro hdmi cable so I can be more helpful in the future.

@erkr
Copy link

erkr commented Jan 11, 2024

The update from 11.3 to 11.4 shouldn't have any effect on Raspberry Pi - the only change reflected in the OS images is #3043 adding a bunch of firmware files...

And Remove rootfstype for Raspberry Pi 5 (#3037)

Could that be related?

@dyarfaradj
Copy link
Author

The update from 11.3 to 11.4 shouldn't have any effect on Raspberry Pi - the only change reflected in the OS images is #3043 adding a bunch of firmware files...

And Remove rootfstype for Raspberry Pi 5 (#3037)

Could that be related?

Probably, can't debug though since I don't have any micro HDMI cable atm

@dyarfaradj
Copy link
Author

I just tried to flash a fresh copy of 11.4 to my SSD and boot it with the RBPi4 wihtout any success. Since I don't have micro HDMI cable I can't give any logs.

But as soon as I flashed 11.3 to the same SSD and booted the RBPi4 it worked, got access to http://homeassistant.local:8123/

So something is indeed wrong with 11.4.

@erkr
Copy link

erkr commented Jan 15, 2024

@sairon @agners
Thanks for all your efforts! Just curious if you already have a fix for this issue in the pipeline. I'm stuck on 11.1

@foltz61

This comment was marked as off-topic.

@dwgtx

This comment was marked as off-topic.

@alanburchill

This comment was marked as off-topic.

@alanburchill

This comment was marked as off-topic.

@agners
Copy link
Member

agners commented Jan 18, 2024

The original poster reported this on a Raspberry Pi 4, so let this issue be about Raspberry Pi 4 only. On the Raspberry Pi 5 the update system is different so this is a different issue and handled by #3065.

@dyarfaradj what type of USB SSD adapter do you use?

Also for other users affected on Raspberry Pi 4: Are you booting from a USB SSD? If so, which model are you using?

@agners agners added the usb-ssd USB SSD related issue label Jan 18, 2024
@agners agners changed the title Bootloop when updating to latest HA OS 11.4 Bootloop when updating to latest HA OS 11.4 on Raspberry Pi 4 Jan 18, 2024
@C0MTRAYA
Copy link

Also for other users affected on Raspberry Pi 4: Are you booting from a USB SSD? If so, which model are you using?

got the issue booting from a micro sd

@dyarfaradj
Copy link
Author

dyarfaradj commented Jan 18, 2024

@dyarfaradj what type of USB SSD adapter do you use?

Also for other users affected on Raspberry Pi 4: Are you booting from a USB SSD? If so, which model are you using?

I'm using this one ORICO 2,5" type C USB 3.1 (Gen 2 6 Gbps) bought from Amazon.

@akm0012
Copy link

akm0012 commented Jan 22, 2024

I'm think I'm seeing the same problem. Here is my output. Going to try to download an older version of HA and see if that helps.

image

@erkr
Copy link

erkr commented Jan 30, 2024

Any chance boot issues like this one on pi4 will be fixed in the upcoming 11.5 release?

@erkr
Copy link

erkr commented Feb 5, 2024

@dyarfaradj @akm0012 @C0MTRAYA
I'm really interested if 11.5 resolves this issue for you. I'm still on 11.1 waiting till this is resolved (I don't really know myself how to revert an upgrade if this would happen, so I'm waiting).
Thanks in advance
Eric

@C0MTRAYA
Copy link

C0MTRAYA commented Feb 5, 2024

@erkr ive just read the patch note, issue 3059 dosent seems to be mentionned. Once ill get home ill clone my setup on a dummy sd card and ill try to updare, i will let you know

@erkr
Copy link

erkr commented Feb 5, 2024

I hope that the closed issue for PI5 was related: #3065 and solved this one as well 🤞

@C0MTRAYA
Copy link

C0MTRAYA commented Feb 5, 2024

@erkr unfortunatly, it did not fixed the issue for me.

for what is worth, heres what i get from the console
ha no boot
seems the pi is trying to boot from the network since its not seeing the boot partition from the sd card. Took out my test card and put back my main sd card, back online

@dyarfaradj
Copy link
Author

So it's not fixed for RB Pi 4 I guess. I can't be bothered to test again since it was a hassle to restore the backup, all settings and re-pair all of my zigbee devices. I'll wait til I see a PR fixing this specific issue

@C0MTRAYA
Copy link

C0MTRAYA commented Feb 5, 2024

@dyarfaradj yeah i have a test card pricesly for testing purpose: if it dont work i can just swap back one of my mains cards and bother to clone the test card later with a working setup for further testing (the number of times I uodated just before going to work only to find something went wrong.. having to wait all day for troubleshooting lol), (that plus two max endurance sd cards cloned weekly, in case of sd corruption..)

@dyarfaradj
Copy link
Author

@C0MTRAYA Great idea! I wish I had done this as well. I've always updated to latest HA Core and HA OS and never had any issues til now. So I'll be more careful and take regularly backups. Lets hope this issue gets fixed

@erkr
Copy link

erkr commented Feb 5, 2024

@C0MTRAYA I really appreciate this! Have to think how to test these kind of issues on my production system as well. For now I will stick on 11.1 ;-(

@erkr
Copy link

erkr commented Feb 10, 2024

I made a full backup and took my chances. I'm glad my upgrade from 11.1 to 11.5 succeeded. My setup uses an ugreen usb3.0 to SSB adapter.

@C0MTRAYA
Copy link

C0MTRAYA commented Feb 10, 2024

so I've deleted the boot partition and formatted my test card, installed a fresh install on 11.5 and it booted (which wasn't on 11.4), restaured from a full backup... and:
20240210_144110
Screenshot_20240210_145315_Home Assistant
I've shutdown the host (not just close ha) and unplug the pi for good mesures, plugged it back in and it boot like normal! gonna run it on the test card for a few days and if everything's fine, I'll updates my main cards!
@erkr , you inspired me to retry troubleshooting haha! thank you for that!

@erkr
Copy link

erkr commented Feb 10, 2024

@C0MTRAYA not much I have done, glad it works for you now! I just upgraded HASOS and no full reboot since the update yet, I now realise that it's a risk as well 😳
Will try that tomorrow 🍀🤞

@C0MTRAYA
Copy link

yeah that was the pb on the first place :/ couldn't boot after shutdown; hope the best for you! if it still dont boot you might try what I did

@erkr
Copy link

erkr commented Feb 11, 2024

Full reboot worked as well 😅

@foltz61
Copy link

foltz61 commented Feb 12, 2024

On Pi 5. Upgraded from 11.3 to 11.5. Update with a full system reboot went fine. Now I'm gun shy on doing updates quickly. I do regular backups but.....

@sparkydave1981
Copy link

Adding a comment here, kinda related... I updated my NUC from HAOS 11.4 to 11.5 last night and also had a hectic boot loop going. Many restarts / power cycling later it's finally stable.

It's a shame we don't get Supervisor logs backed up like HA Core ones from the previous boot.

The only thing I see just before the last restart in my HA Core log is:

2024-02-15 19:59:25.028 ERROR (MainThread) [zigpy.zcl] [0x1FFA:1:0xef00] Traceback (most recent call last):
  File "/usr/local/lib/python3.12/site-packages/zigpy/zcl/__init__.py", line 415, in reply
    return await self._endpoint.reply(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy/endpoint.py", line 278, in reply
    return await self.device.reply(
           ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy/device.py", line 488, in reply
    return await self.request(
           ^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/zigpy/device.py", line 322, in request
    await send_request()
  File "/usr/local/lib/python3.12/site-packages/zigpy/application.py", line 833, in request
    await self.send_packet(
  File "/usr/local/lib/python3.12/site-packages/zigpy_deconz/zigbee/application.py", line 527, in send_packet
    status = await req.result
             ^^^^^^^^^^^^^^^^
asyncio.exceptions.CancelledError: Final process shutdown

Copy link

There hasn't been any activity on this issue recently. To keep our backlog manageable we have to clean old issues, as many of them have already been resolved with the latest updates.
Please make sure to update to the latest Home Assistant OS version and check if that solves the issue. Let us know if that works for you by adding a comment 👍
This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale label May 16, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale May 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
board/raspberrypi Raspberry Pi Boards bug stale usb-ssd USB SSD related issue
Projects
None yet
Development

No branches or pull requests