I can create files and programs, but when I power cycle the Pi, all the new content is gone. I have tried to edit an existing file. The changes were gone after the power cycle. File manager shows 2.4G free. Any thought?
I can create files and programs, but when I power cycle the Pi, all the new content is gone. I have tried to edit an existing file. The changes were gone after the power cycle. File manager shows 2.4G free. Any thought?
Check and see if the partitions are mounted read only for some reason. Use the command "mount" (minus the quote marks) and look for (ro) at the end of any of the lines in the output.
The very last line has '...flash,errors=remount-ro,...'.
I don't see any errors.
It sounds like that for some reason at least one partition is being mounted read-only. Without the full output of the command it is difficult to diagnose further. Try running "dmesg" and look for errors there, also look in /var/log/messages for any error messages.
---Edit---
This is not the issue, as Roger Wolff pointed out, if the file system went read-only your process should throw an error and your editor would not let you save the file
Again... The process triggering the error would not be getting an error. But all subsequent writes would immediately fail with read-only file system.
I created a test read-only filesystem. When I edit a file with nano I get the following status message:
[ Warning: Modifying a file which is not locked, check directory permission? ]
Then when I try to exit and save the file, I get:
[ Error writing test.txt: Read-only file system ]
and nano refuses to exit. If your home dir would remount readonly due to errors you'd notice it.
Again... The process triggering the error would not be getting an error. But all subsequent writes would immediately fail with read-only file system.
I created a test read-only filesystem. When I edit a file with nano I get the following status message:
[ Warning: Modifying a file which is not locked, check directory permission? ]
Then when I try to exit and save the file, I get:
[ Error writing test.txt: Read-only file system ]
and nano refuses to exit. If your home dir would remount readonly due to errors you'd notice it.
Good point. I have seen file systems go read only that didn't impact home directories. It depends on the layout of the SD card, then again, on a Pi it is probably just one big file system on the SD card. I was thinking in the mind set of a large hard drive with separate partitions for home, boot, var, etc, and should have looked closer at his df output.