My SD Card originally was plugged in Android Phone for years with no problems. Recently I bought a Raspberry Pi 3, so I formatted my SD card and installed Raspbian.
Several times after upgrading the system or installing some new software and restarting it, Pi reported ELF file system error. At those times I could not shutdown the Pi with command line and I had to cut off the power. Later I found this action totally damaged my SD card (it's always write protected).
Is there way to shutdown gracefully in case of the system error?
Like in Android I can always press power button for several seconds to close it. But Raspberry Pi does not have such mechanism.