RPi4 File system corrupt. Reinstall necessary

My RPi4 has been confronted with too many unexpected reboots and the SD image now suffers from file system corruption. I managed to write back an earlier back-up, but after a while, the problem obviously recurs. I tried to fix the issues on OS basis, but didn’t succeed.

I managed to save all config files and was wondering if that would help me to do a full reinstall on a the SD card, after reformatting. I am running HomeAssistant on Raspbian. Steps I have in mind to get to a clean start:

  • do a fresh install of Raspbian
  • Install Python
  • Install HomeAssistant
  • Copy over all my saved config files and other resources

Any suggestions to the above are highly appreciated.

Seems OK to me. Don’t forget to copy the hidden files and directories too !

Thanks Francis. The hidden files (the ones with the dot) copied just fine.

I’d invest in either a new SD card or preferably an SSD drive too. You’ve had the early warning from what you are saying.

You may want to put your HA database somewhere else, not onto the SD card. The db is a real killer, due to the constant very high amount of rewrites. And having it on the card is really slow. While an SSD will fix the problem too, there is no need for one as long as you keep the database off the SD.