Scenario

When using e.g. OpenELEC with Raspberry Pi, SD cards often get corrupted after some days.

You get error messages like

Error in mount_storage: mount_common: could not mount /dev/mmcblk0p2

Reasons

  • Removing power or resetting when system writes to SD card (without shutdown before). This should be avoided; it might work 100 times or more without a problem but can also damage the file system after 1-2 times.
  • Updating OpenELEC sometimes leads to this problem, especially on RPis.
  • In OE forum there are also discussions that OE 5.x leads to more corrupted SD cards than older versions.
  • SD card itself is damaged, either inside controller or physically.

Solutions

If you have a quite new SD card, in most cases only a part of the file system is corrupted.

If you get access to shell, try this command:

 

 

Or for check on next reboot:

 

 

An alternative to above ways could be to create a Gparted USB stick like described here. Boot from stick, then run all available checks on every partition.

Reference

  [email protected]