0

Summary

My Pi has crashed a few times recently. I'm investigating ways to make it stop, but I'm also concerned that there are immediate implications to my file system.

Background

After one crash, I couldn't boot the Pi properly. It complained of filesystem corruption, so I ran fsck on both SD card partitions. It could then boot, but several services didn't run. For example, apache2 wouldn't start, complaining that there was no group www-data.

I noticed that /etc/groups was now a symlink pointing to ../init.d/<something_I_forget>. I restored it, and the Pi now started fine.

How could this file get corrupted in such a strange way? Also, I am now concerned that other files are similarly corrupted, and I'll only notice later down the track. Is this possible? Can I check, or should I restore an older backup?

Sparhawk
  • 683
  • 4
  • 18
  • 34

1 Answers1

2

This is somewhat common if your Pi shuts down unexpectedly (perhaps from low voltage) or crashes, or even if you shut it down without stopping Apache gracefully - if this is going to be a common occurrence, you may want to set it up such that the SD card is in read-only mode

alternatively, different file systems have different anti-corruption implementations, and some may be better than others.

Unfortunately detecting a corrupt file is rather difficult to do without trying to actually use the file, and trying to use the file may not occur until "somewhere down the track".

see here fore more info

user2813274
  • 1,309
  • 1
  • 12
  • 22