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?
sudo raspi-config
, and was toldinsserv: warning: script is corrupt or invalid: /etc/init.d/../rc0.d/K01nmbd
. OTOH, read-only access to the SD card seems too complicated for me. I need to write frequently to/var/www
and numerous other directories. I'd be excluding so many directories that they would be at risk of corruption anyway. – Sparhawk Aug 16 '14 at 04:01backintime
image, which worked perfectly. I have a cron job to back up nightly. I could then justrsync -aEHAXP --del
the/
and/boot
directories back to the SD card, and was good to go. – Sparhawk Aug 16 '14 at 04:03