strawberry
Posts: 62
Joined: Tue Oct 30, 2012 10:44 am

Pi crashes, all files disappear

Fri Oct 21, 2016 4:37 pm

I have a Raspberry pi set up as a security camera (with Pinoir camera module). It worked perfectly for 9 months but since 2 weeks ago it stops working after a few days. It has apache running as a webserver, samba for file sharing.
When I go to the webpage after the crash it shows a message there are no files in the /var/www directory. Samba has some shared folders which turn out to be empty. So it seems like most of the software / programs are still running but there is a problem with accessing the (root) file system? SSH login is not possible anymore so can't do any dmesg,...
Could this be a problem with the SD card, maybe connection problem with the SD socket? Anyone experienced this problem of all files disappearing?

I've also enabled the watchdog but the Raspberry doesn't boot anymore after the watchdog reset. If I reset it manually by removing the power it works again for a few hours/days.

wh7qq
Posts: 1475
Joined: Thu Oct 09, 2014 2:50 am

Re: Pi crashes, all files disappear

Fri Oct 21, 2016 7:10 pm

The first thing to try is a fresh SD card loaded with a fresh copy of Raspbian. See if it boots ok, runs ssh ok, and stays up as it should.

You could have had a power failure or a brown out at a time when the Pi was writing to something in the SD card. That would bork the SD card but not so much that it won't boot. You should set up a backup system to an exterrnal system because SD cards can and do get corrupted, even on newer Pi's with late OS installed.

strawberry
Posts: 62
Joined: Tue Oct 30, 2012 10:44 am

Re: Pi crashes, all files disappear

Sat Nov 05, 2016 9:43 am

Installed a new SD card and it's working now for more than a week. I think it was a problem with the contacts of the SD card because the file system seems fine when mounting the card on a computer.

Return to “Troubleshooting”