Kernel Panic - Corrupted sd card


Out of nothing my RPI stopped working, and found out, that my it was my sd card.
I can’t format it, but access it from my laptop.
Is it possible to save my items file, by copying all data from it, and put onto another sd?

Perhaps, assuming your laptop is running Linux. You can try mounting the card and accessing the data. Since the card is corrupted, the data may be too.

Having your Pi protected by a UPS that can sanely shut it down is how you avid filesystem corruption due to sudden power loss.

It’s a laptop running Win10.
So there’s nothing do do?

You can restore from a backup. If it was not important enough to back up I guess you need to freshly rebuild the configuration.

1 Like

Ouch, sometimes the truth just has a nasty sting to it.

@KSN: Not only make a backup but verify you can restore OH from it.

1 Like

You can boot into a LiveCD Linux distro, start up a Linux VM or find a file system driver that supports ext2 type file systems. Paragon Soft has one.

But you need far more than just .items files to completely restore the system. You need most of what is in /etc/openhab2 and /var/lib/openhab2 as well. And if your file system became corrupted because of a power loss or the SD card wearing out, you can’t really rely on any of the files on the SD card. You might need to review each and every file looking for corruption. And these will only restore openHAB. You were probably running other stuff too and they will have their own backup and restore procedures.