operating-system icon indicating copy to clipboard operation
operating-system copied to clipboard

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

Open dyarfaradj opened this issue 1 year ago • 42 comments

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 avatar Jan 10 '24 08:01 dyarfaradj

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?

sairon avatar Jan 10 '24 14:01 sairon

@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.

dyarfaradj avatar Jan 10 '24 14:01 dyarfaradj

Same with my Pi 5 and USB SSD. It also didn't create a backup automatically like usual for some reason. Luckily I have a recent sdcard install. I booted the pi with the SD and SSD and it's using the data from the SSD snd I'm able to create a backup to get back to pre update setup.

foltz61 avatar Jan 10 '24 14:01 foltz61

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

dyarfaradj avatar Jan 10 '24 15:01 dyarfaradj

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

leonardpitzu avatar Jan 10 '24 15:01 leonardpitzu

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.

foltz61 avatar Jan 10 '24 16:01 foltz61

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.

dyarfaradj avatar Jan 10 '24 16:01 dyarfaradj

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.

foltz61 avatar Jan 10 '24 17:01 foltz61

Hi, I also had the same problem on my Raspberry PI 5 with installation on SD memory (purchased less than a month ago). Since I installed hassio on Pi 5, every time I updated HA OS I had this bootloop problem. Initially I thought it was because the release was still a candidate. In these weeks (since HA OS for PI5 was released) I will have restored my SD about 4 times (practically with every new release). The latest one was yesterday (HA OS 11.4)... although in this case I didn't expect it to break, as it was updated from a stable release 11.3 to another stable release 11.4. I can only provide a screenshot of the first boot loop that happened to me when I upgraded from 11.3.rc1 to 11.3.rc2 I hope it can help you understand the problem. Thank you Error PI5

EnzoD86 avatar Jan 10 '24 23:01 EnzoD86

I setup 11.3 on my pi 5, using sd instead of ssd, and restored my backup. Then installed 11.4 and everything is working fine. I will do the same to SSD tomorrow and post the results.

foltz61 avatar Jan 11 '24 03:01 foltz61

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.

sairon avatar Jan 11 '24 11:01 sairon

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.

C0MTRAYA avatar Jan 11 '24 11:01 C0MTRAYA

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.

foltz61 avatar Jan 11 '24 14:01 foltz61

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?

erkr avatar Jan 11 '24 23:01 erkr

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 avatar Jan 12 '24 12:01 dyarfaradj

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.

dyarfaradj avatar Jan 13 '24 20:01 dyarfaradj

@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

erkr avatar Jan 15 '24 17:01 erkr

I now have the proper hdmi cable to get a screenshot of the error on my pi 5. I'm guessing the error is the same as was found for @EnzoD86. If you still want a screenshot let me know and I'll do the update again.

foltz61 avatar Jan 15 '24 20:01 foltz61

I'm running HAOS on an Intel NUC. Everything was running well (11.3) until the upgrade to 11.4, after which I was unable to access the homeassistant.local port. Viewing the NUC locally revealed a cifs_mount failed w/return code = -101 error, which means the OS starts before the network connection is established. Tried several 11.4 reinstalls to no avail - same issue after each reboot. Note that HAOS 11.4 appears to boot correctly but without network access. I did some research and saw suggestions about disabling IPV6, or modifying config files to add a delay to wait for an established network, but I've never had to worry about that prior to 11.4, and don't need want to worry about it now. I'll wait for the HA team 11.4.1 release which fixes their mistake. I reinstalled 11.3 and restored my last daily backup. It's nice to be back in Home Automation Heaven...

dwgtx avatar Jan 15 '24 22:01 dwgtx

Also have this issue.... Power off or restart will go into boot loop. Running Raspberry Pi 5 with 11.4

alanburchill avatar Jan 17 '24 22:01 alanburchill

haos_rpi5-64-11.5.dev20240117.img has resolved this issue for me.

alanburchill avatar Jan 18 '24 03:01 alanburchill

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 avatar Jan 18 '24 09:01 agners

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

C0MTRAYA avatar Jan 18 '24 11:01 C0MTRAYA

@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.

dyarfaradj avatar Jan 18 '24 12:01 dyarfaradj

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

akm0012 avatar Jan 22 '24 01:01 akm0012

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

erkr avatar Jan 30 '24 15:01 erkr

@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

erkr avatar Feb 05 '24 15:02 erkr

@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

C0MTRAYA avatar Feb 05 '24 15:02 C0MTRAYA

I hope that the closed issue for PI5 was related: https://github.com/home-assistant/operating-system/issues/3065 and solved this one as well 🤞

erkr avatar Feb 05 '24 17:02 erkr

@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

C0MTRAYA avatar Feb 05 '24 21:02 C0MTRAYA