Jump to content

Recommended Posts

Posted

Hi.

 

The following happened.

 

When power is suddenly cut off in emmc, the file contents created by fopen (), fprintf (), fflush() and fclose () are not saved after rebooting. It seems that it has not been physically written out while being cached.

 

If display the file before cutting off the power, the contents are correctly saved.

 

In addition, if it is normally reboot it is saved correctly.

 

Posted

This can occurs on any Linux or even on other OS where files a cached and written to disk in background after a certain amount of time.

If you wish to ensure that files are not cache any more, the "sync" command will force the caching to be written on disk.

Power failure will always produce such behaviour, even on PC or Mac.

Posted

martinayotte, Thank you very much.

 

When sync () is described after fclose (), it can operate normally.

Since raspbian was able to operate without problems, I thought whether it was a problem on the system.
It seemed that there was no problem with raspbian, it happened by chance.
 

Posted (edited)

Hey, Guys, I m having the same problem here, for example i have done git clone command to get the rep cloned, after that i did reboot and all files were gone, I have also had pi pc plus, any ideas ? thx

 

P.S Sync doesn t help.

Edited by Vladyslav Vladyslav
Posted

It might be that your armbian starts on "virtual read-only" mode. Check that first please. Normally, it should be printed on the screen when you boot your board. In that case all changes are gone after a reboot. You need to run `armbian-config` and disable virtual read-only mode.

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines