The Home Automation Blog
Home » Fix System Crashes After Home Assistant OS Update on Raspberry Pi with Z-Wave Stick

Fix System Crashes After Home Assistant OS Update on Raspberry Pi with Z-Wave Stick

The Problem

After updating Home Assistant OS to version 12.4 on a Raspberry Pi with a Z-Wave stick, the system keeps crashing. Upon further research, I discovered that this issue is related to a Linux kernel bug.

More information can be found here:

Raspberry Pi bootloop after 12.3 update (usb related) · Issue #3362 · home-assistant/operating-system · GitHub

The fix

We need to load a different driver.

  • Power down the PI
  • Remove the SD card and put it in a Windows PC
  • Open File Explorer and click on hassos-boot

Add the following line ( before [all] ) dtoverlay=dwc2

  • Save the file
  • Put the SD card back in the Pi and boot the PI

It should now work as expected.

Fix without using Windows

You can also do this within home assistant but make sure you have disable protection mode on the add-on Advanced SSH & Web Terminal ( Settings -> Add-ons )

A quick how-to so you don’t have to remove the SD Card to edit config.txt.

  1. SSH In, or open a Terminal window through Home Assistant. You may need to use the Advanced SSH & Terminal add-on, but I don’t really know because I haven’t tried it with the other one.
  2. Run the following commands:
    docker exec -it $(docker ps -f name=homeassistant -q) bash
    cd /mnt
    mkdir boot
    fdisk -l
  3. Take the “Disk” at the top and add “p1” to the end of it for the next command. My disk was “/dev/mmcblk0” so in my mount command it became /dev/mmcblk0p1 to mount the first partition, which is the boot partition.
    sudo mount /dev/mmcblk0p1 /mnt/boot
    cd /mnt/boot
    sudo vi config.txt
  4. Press the i key and find a blank line somewhere in the file before [all]. You can literally put this anywhere.
  5. Add the following line: dtoverlay=dwc2
  6. Hit ESC
  7. Type :wq
  8. Close the shell, and you’re done. Now you can update Home Assistant and it should start up using the dwc2 driver.

Als reboot the pi after all these steps and update to make sure it is running

Most Popular Post

Contact Us