Hi, I use Raspberry as a part of my product. Basically, there is a Raspbian (with most of the stuff turned off - no X, no network and so on...) and it is set to launch my application on startup. Pretty easy so far. It works but there is one thing I am worried about. The device can be switched off anytime. More specifically, the power cord can be unplugged anytime. And I need the device to always work when switched on again. Well it has not happened to me so far, that it would not work, but I think it can happen when writing some data to the SD card, the power may go down and it would corrupt the filesystem on the card.
Well, I could set the SD card as read-only as in viewtopic.php?p=213440
. But the thing is that from time to time (not really often), I need to save the application settings to the file.
Do you have any solution or suggestion - what is best in my case? I do not insist on having the partition as read-only. But I need it to boot under any circumstances. I would not even mind losing the settings file (but there is zero probability the power drops while saving the settings file as it has few bytes and the user typically sets the stuff only once). What i am worried about is what the OS itself writes to the SD card (for whatever reason).