Switching from and to read-only file systems

Do you have a question? Post it now! No Registration Necessary

Translate This Thread From English to

Threaded View
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.


Re: Switching from and to read-only file systems

Quoted text here. Click to load it
set
this
the
do
hand

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

Quoted text here. Click to load it


Re: Switching from and to read-only file systems
Thanks.

Jens.


Re: Switching from and to read-only file systems
Check out: "Mini-fanout filesystem achieves release". The URL is
"http://www.linuxdevices.com/news/NS6670875625.html "

In short:
Denx developer Markus KlotzbFC%cher 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, KlotzbFC%cher says.

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

Rgds,
Sachin


Re: Switching from and to read-only file systems

Quoted text here. Click to load it
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.

Quoted text here. Click to load it

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 http://cfd.linnix.com/main.php?laptop



Quoted text here. Click to load it


Re: Switching from and to read-only file systems
Hi,
Quoted text here. Click to load it
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:
http://www.fsl.cs.sunysb.edu/project-unionfs.html

Gruesse
    Ulrich Hochholdinger

--
\                                         E-Mail: snipped-for-privacy@hochholdinger.net \
/ ++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ /
We've slightly trimmed the long signature. Click to see the full one.

Site Timeline