# Ebedded Linux: Recoverable, battery backed-up RAM (/tmp) [closed]

I hope this is an appropriate place for this question as it involves the use of the kernel.

I have an embedded system with a battery backup for the RAM chip. The battery also allows for the MCU to gracefully shutdown.

The data I am writing to RAM goes in the /tmp folder. When Linux shuts down and then eventually boots up again, I lose access to the RAM.

In the graceful shutdown process, is it possible to save the mounting location (memory location) of /tmp to a file in non-volatile memory so that when Linux boots up again it can line up the memory and allow me to access the preserved RAM accurately?

If so, how can this be done?

Thanks!

## closed as too broad by Eugene Sh., RoyC, laptop2d, Elliot Alderson, FinbarrOct 18 '18 at 9:36

Please edit the question to limit it to a specific problem with enough detail to identify an adequate answer. Avoid asking multiple distinct questions at once. See the How to Ask page for help clarifying this question. If this question can be reworded to fit the rules in the help center, please edit the question.

• You should use a different folder than /tmp, /var/cache for example. Anyway, this is a linux question, there are other sites for this. unix.stackexchange.com – Jeroen3 Oct 15 '18 at 11:36

Note that tmpfs is not designed with any kind of persistence in mind: the filesystem simply gets recreated from scratch every time you mount it. Also, /tmp is the wrong place to keep persistent files anyway. Even if you get to preserve RAM contents and write a persistence-aware filesystem driver, Linux is free to wipe the /tmp folder when it reboots.