|
If you don't need to keep changes between executions, you can mount the filesystem as ro, with only some temporal folders mounted on RAM. If some configurations have to be keep, a partition in ROM can be mounted only for this end. |
|||
|
|
Ideally, you'd have a battery (or supercapacitor) that'd keep you alive long enough to allow you to detect the main power supply cut-off and perform a clean shutdown. In the absence of that, anything else is merely damage limitation. That said, some suggestions:- * Use different filesystems for data areas of the system (e.g. /data), and mount OS filesystems (e.g. /system) read-only. That should prevent OS components from being corrupted, unless the user is foolish enough to begin an OS upgrade before cutting the power. * Mount data filesystems with synchronous writes enabled. This will impair performance, and on reduce the life of flash memory-hosted filesystems by increasing the total number of writes committed. * Give the use an obvious "clean shutdown" option. * If your device is battery powered, monitor the remaining battery capacity and shutdown at some empirically-determined "safe" minimum level (e.g. 5% remaining). |
|||
|
|
4
Answers
|
|
10
Answers
|
|
10
Answers
|
|
4
Answers
|
|
27
Answers
|
|
2
Answers
|
|
2
Answers
|
|
0
Answers
|
|
4
Answers
|
|
1
Answer
|
The Linux Foundation is a non-profit consortium dedicated to the growth of Linux.
Join / Linux Training / Board