I don't bother to mount the filesystem readonly - but my programs rarely if
ever write to
it, and I have no problems(*) with just turning the box off by removing power.
I do use a RAM filesysten at /tmp for all temporary files.
I add one line to /etc/fstab so it looks like this:
$ cat /etc/fstab
proc /proc proc defaults 0 0
/dev/mtdblock/1 / jffs2 0 0
ramfs /tmp ramfs 0 0
You can see the effect here:
$ mount
/dev/root on / type yaffs2 (rw)
none on /dev type devfs (rw)
/proc on /proc type proc (rw)
ramfs on /tmp type ramfs (rw)
$ df /tmp
Filesystem 1k-blocks Used Available Use% Mounted on
ramfs 0 0 0 0% /tmp
$
I write logfiles to /tmp, and it's obviously extremely fast, so I am happy to
read and write
temporary files for interprocess communication knowing it is not wearing out
the Flash
RAM.
Other questions: you can add additional ramfs filesystem if you want. Don't
mount /var
readonly - things like to write a file containing their pid to /var/run/pid -
for example
pppd and apache, I think, there may be others. (On Solaris, I think /var/run
is a ramfs)
Martin
* - on one out of about 10 TS7250, sometimes the executables get corrupted
after power
cycling. I've asked about it here a few times, with no luck. And it's not
consistent or
repeatable, but is confined to only one card.
--- In "Mike Dodd" <> wrote:
>
> I asked once before, and got some good information, but I'm still
> confused. I have a TS7250 that I want to use in an embedded
> application. When done, I'd like to be able to just kill the power
> without corrupting the filesystem. The answer I got was to mount the
> filesystem read-only, and to make a RAM drive for temporary files. I'm
> not sure how to do this last part. Reading through the message
> archives, I found something that suggests making a mount point at
> /var/ramfs, and something else that says to use tmpfs. what are these?
> How do I use these? Should I just make a symlink from /tmp to
> /var/ramfs? Can someone give me an example of how to set up a RAM disk
> for files Linux writes that I don't care about? Is /tmp the only mount
> point I need to mount on a RAM drive? what about /var? Can that be
> mounted RO? Thanks in advance for any clarification on this. I'd like
> to begin using the 7250 as a stand-alone box, instead of telnet'ing-in
> to start the application and shut down the system when I'm done.
>
> Mike
>
Yahoo! Groups Links
<*> To visit your group on the web, go to:
http://groups.yahoo.com/group/ts-7000/
<*> Your email settings:
Individual Email | Traditional
<*> To change settings online go to:
http://groups.yahoo.com/group/ts-7000/join
(Yahoo! ID required)
<*> To change settings via email:
<*> To unsubscribe from this group, send an email to:
<*> Your use of Yahoo! Groups is subject to:
http://docs.yahoo.com/info/terms/
|