I used a setup in which the flash disk is mounted read only as / and
/tmp is mounted to a ram disk. For the file which are to be modified
I've symbolic links to the /tmp tree in the ram disk

these files/dirs are linked out (depend on your configuration):

etc/mtab -> /proc/mounts
etc/psdevtab -> /tmp/psdevtab
var/lock -> /tmp/var/lock
var/log -> /tmp/var/log
var/run -> /tmp/var/run


part of my init script:

#################################################################
# Parameter
TMP_KB_SIZE='1024'
TMP_DEVICE='/dev/ram2'

PATH=/usr/bin:/bin:/sbin:/usr/X11R6/bin

mount -n -o remount,ro / 2>/dev/null
#mount -n -o remount,rw / 2>/dev/null

mount -n -t proc /proc /proc

echo "/tmp in RAM-disk anlegen"
umount -n /tmp

mkfs.ext2 -q ${TMP_DEVICE} ${TMP_KB_SIZE}
mount -n -t ext2 ${TMP_DEVICE} /tmp
rm -r /tmp/lost*
chmod ugo+rwx /tmp

# alle Files, die zur Laufzeit geaendert werden, muessen nach /tmp/... 
# gelinkt werden

mkdir /tmp/var
mkdir /tmp/var/log
mkdir /tmp/var/lock
mkdir /tmp/var/run
mkdir /tmp/etc
#################################################################


Corvin

Robert & Patricia Warner wrote:
> 
> Hi,
> 
> I'm noticing that linux requires a few files to be generated at startup.
> I'm using a disk on chip, aka flash disk, with rtlinux and am trying to
> minimize the re-writing of data on the disk.  Is it possible to use a small
> number of ramdisks and/or nfs disks to act as the directories where the
> above mentioned data gets written?  i.e. directory aliasing??? I don't know
> if it's called this or not.  What commands/scripts would I need to use to
> set this up if the above is feasable?
> 
> Thanks for your help
> Bob Warner
> 
> --- [rtl] ---
> To unsubscribe:
> echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
> echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
> ----
> For more information on Real-Time Linux see:
> http://www.rtlinux.org/~rtlinux/

-- 
Corvin Zahn <[EMAIL PROTECTED]>
--- [rtl] ---
To unsubscribe:
echo "unsubscribe rtl" | mail [EMAIL PROTECTED] OR
echo "unsubscribe rtl <Your_email>" | mail [EMAIL PROTECTED]
----
For more information on Real-Time Linux see:
http://www.rtlinux.org/~rtlinux/

Reply via email to