I run my HomeAssistant on a RaspberryPi 4 from a SD card. Two days ago I did a upgrade to the newest version (I don’t remember if it was HomeAssistant or the Operating System) and since then it does not boot anymore.

I connected it via HDMI to a screen and got those errors:

It looks to me that the SD card is corrupted or something. Any idea if I can fix it in any way or do I need to redo the setup from scratch?

  • schizo@forum.uncomfortable.business
    link
    fedilink
    English
    arrow-up
    5
    ·
    2 months ago

    Your image is itty-bitty here in Lemmy-land, at least, but a dead SD card on HA is… unsurprising.

    It might be recoverable if you plug it into a linux box and try to extract the data, but as for recovering it, it’s the same as a dead hard drive: you might get data back, but the physical media is trash.

    You probably want to NOT use a SD card and pick any other option (USB real SSD, NVMe hat, etc.) because, well, SD cards are not very good at this kind of use case. (HA writes a lot of historical data, and is basically always chattering away on the disk.)

  • just_another_person@lemmy.world
    link
    fedilink
    English
    arrow-up
    4
    ·
    2 months ago

    Your SD card is shot. SD cards aren’t built for sustained read/write cycles, and RPi installs regularly kill them from excessive access to disk from things like logging and DB access.

    On HA specifically, you can solve for part of this by reducing all logging to minimal, and then for the bulk of the rest setup something like log2ram to store system logs in RAM and prevent wearing out the SD disk.

    A more permanent fix would be to get an SSD instead, but that’s not always an option.

  • NeoNachtwaechter@lemmy.world
    link
    fedilink
    English
    arrow-up
    3
    ·
    2 months ago

    The SD card is broken, but not totally dead yet.

    So, decide now if you want to try and rescue some files from it, then DO NOT USE IT anymore until the real data recovery operation starts. No further tries to boot, no fsck etc.

    • Prison Mike@links.hackliberty.org
      link
      fedilink
      English
      arrow-up
      3
      ·
      edit-2
      2 months ago

      To add to this, I’d personally just clone the card immediately to somewhere else then do all the recovery efforts on the clone; if only to avoid burning out the SD card even more during recovery.

      Edit: Not sure if that would be better or worse.