Switching from and to read-only file systems

My embedded linux application is running with the linux file system set to read-only, so I don't get in trouble just shutting the system off. However, I would like to store certain data (calibration data) on this CF disk, but to do so I would have to jump out of read-only, write the data to a file and then go back to read-only. My question is: Can I do this from the running application? Currently I am just doing it by hand in a terminal window.

Please advise,

Jens.

Reply to
Jens
Loading thread data ...

set

this

the

do

hand

Why not? Just call "remount" from your apps.

Reply to
linnix

Check out: "Mini-fanout filesystem achieves release". The URL is "

formatting link
"

In short: Denx developer Markus Klotzb=FCcher has released a GPL kernel module for Linux 2.4 or 2.6 that makes read-only filesystems writable by virtualizing them. The "Mini Fanout Overlay" module (mini_fo) can be used to save changes to live CDs, for sandboxing, or for testing embedded systems, Klotzb=FCcher says.

This *might* be able to do what you need, without the switch being required.

Rgds, Sachin

Reply to
sg

for

Yes, that's great for CD, if you don't need to modify it. However, the "overlay" file system is not suitable for flash drive, as the OP wanted.

But we do want to switch at the right time and save the right space. We are doing something similar to the OP's idea. We have an internet browsing station mounted read-only all the time, and only switching to write at the end. Since we are switching hardware all the time, the drive is remounted r/w piror to the KDE session for configurations. The point is to mimimize the r/w opening as much as possible.

Most of the time, no saving is necessary and we tell them to turn-off the power in the middle of the KDE session. It is actually safer to turn it off without shuting down the session. However, the customers start doing that to their window machines as well, and they blame us for their bad habits.

For details, see

formatting link

Reply to
linnix

You can also use unionfs (it's nearly the same as mini-fanout), and mount a small ext2-partition rw,sync,dirsync over the ro-partition, if the system crashes while writing, the fsck-cycle is small, and fast, and you don't have to think on remounting, and so on... unionfs:

formatting link

Gruesse Ulrich Hochholdinger

--
\                                         E-Mail: ulrich@hochholdinger.net \
/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /
 Click to see the full signature
Reply to
Ulli Hochholdinger

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.