[sf-lug] how to run software automatically at start up; how to make a ram disk
jim at systemateka.com
Mon Aug 6 15:24:01 PDT 2012
Thanks lots, Ken.
I had to ponder some. I went to
to read about the difference between ramfs and tmpfs
(another to-the-point, clear, useful article).
Great tip about making symlinks to spare the SSD!
For those interested:
* ramfs creates a ram disk and will grow as one adds
files. Warning: ramfs will grow to consume all ram.
* tmpfs creates a ram disk of a certain size, and as
files grow over the ram disk size, tmpfs uses swap.
I believe the following mount commands do what Ken's
/etc/fstab entries do, though they'll be gone after
# mount -t tmpfs -o size=256M tmpfs /tmp/ ; chmod -777 /tmp/
# mount -t ramfs -o size=250M ramfs /var/log/ ; chmod 755 /var/log/
and an example symlinks command might be
# ln -s /tmp/ /var/cache/apt/archives/
On Mon, 2012-08-06 at 14:53 -0700, Ken Shaffer wrote:
> Hi Jim,
> For my usb setup, I just put in the below two line into fstab:
> # update-manager cannot see any space in /tmp when ramfs used
> tmpfs /tmp tmpfs size=256M,mode=1777 0 0
> ramfs /var/log ramfs mode=755 0 0
> Then any program using /tmp gets the benefit of fast ram-based access.
> I can then add specific links to /tmp, like /var/cache/apt/archives,
> so my package
> downloads for updates don't need to write to the usb flash memory.
More information about the sf-lug