Can't see saved file after reboot in /data file system.

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Can't see saved file after reboot in /data file system.

688 Views
eddiehuang
Contributor II

Hi,

Recently I tried to save a file in /data file system, for instance, "echo 1 > /data/a.txt" and reboot. I cannot see this file after reboot, why is that? Thank you.

0 Kudos
4 Replies

604 Views
christophertele
Contributor III

i had the same problem. files created with "touch" are deletd during boot (from SD). the only thing that works is using "vi" to create, read and write files on the SD-card. Nano can read but isnt able to safe your changes.

cheers

Christopher

0 Kudos

604 Views
b36401
NXP Employee
NXP Employee

I suppose the file can be cached and its update can be delayed a bit and then lost with sudden reboot.

So I can provide a common suggestion. Please try to perform "sync" before reboot.

By the way. What filesystem is used for /data ?

Is it located on some separate partition or device?

Have a great day,

Victor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos

604 Views
eddiehuang
Contributor II

Thanks for your reply. ext4 file system is used for /data and this happens when the board is booting with SD card while the creation of a file could be kept with eMMC booting. I'm new to this field and I cannot figure out why there's such a difference existing in various booting ways.

0 Kudos

604 Views
b36401
NXP Employee
NXP Employee

I have no idea too why it depends on booting source.

Please try to run "sync" and check if it helps.

Have a great day,

Victor

-----------------------------------------------------------------------------------------------------------------------

Note: If this post answers your question, please click the Correct Answer button. Thank you!

-----------------------------------------------------------------------------------------------------------------------

0 Kudos