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

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 

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

818 次查看
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 项奖励
回复
4 回复数

734 次查看
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 项奖励
回复

734 次查看
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 项奖励
回复

734 次查看
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 项奖励
回复

734 次查看
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 项奖励
回复