Page 1 of 1

index.html edits disappear after a reboot

Posted: Fri May 13, 2016 5:49 pm
by davehiggins2170
I've recently installed Raspbian (Jessie) on a Pi B+ and installed Apache and PHP and copied some HTML and PHP code from a Dalek project from the forum. I changed /var/www/ to be owned by pi and successfully edited index.html to change various bits including a link to a gif file which I copied into /var/www/html and it all worked. I then changed some of the .php files that the html used and got them working.

After a reboot all my changes to index.html and the .php files had disappeared and the gif had gone as well and the permission had reverted to root. It looks like the whole folder had been copied back from somewhere.

I've done this sort of thing before without problem - has something changed recently or is there a setting somewhere that I've missed?

Thanks for any help Dave

Re: index.html edits disappear after a reboot

Posted: Fri May 13, 2016 6:03 pm
by B.Goode
Sounds very similar to this thread, in which I commented:

viewtopic.php?f=28&t=145965&hilit=impossible

Re: index.html edits disappear after a reboot

Posted: Sat May 14, 2016 6:15 pm
by davehiggins2170
Hi thanks for that - looks like that is the problem. I can't now write to the SD card even using SDformatter or the HD Raw Copy tool that I use for making backups. It's only got about 3.6Gb on an 8Gb card. I don't know where it came from as it and the Pi were presents but looks like I'm going to have to find some new cards, I've got loads of cards suitable for my original B but only this one micro card.

Cheers Dave :D

Re: index.html edits disappear after a reboot

Posted: Fri May 27, 2016 6:42 pm
by davehiggins2170
I've now copied the failing card to a new one and it is working fine. The old card is going in the in once I'm sure I've got everything off it.

Re: index.html edits disappear after a reboot

Posted: Fri May 27, 2016 6:55 pm
by stderr
davehiggins2170 wrote:Hi thanks for that - looks like that is the problem. I can't now write to the SD card even using SDformatter or the HD Raw Copy tool that I use for making backups.
I wonder if some of the sdcards lock you out of writing to the materials that were there but still present them read only and allow writes to some other part of the flash drive that then aren't made available on reboot. People have said that some drive fail to read only to protect the data, but it seems more than just not letting you write because it seems like you actually could write and it was all there until you rebooted. It would be interesting if someone did a more detailed examination of one of these failing cards to see. I have a 4gig card that would not work correctly, everything was fine when I plugged in a crappy 8gig Amazon special, but it didn't fail in the way you described, I could read and write from it, it just locked up the machine. So there are different failure modes and different ways different cards handle failure.