I just installed Debian 5 (Lenny) and I noticed that /lib/init/rw is reported as a RAM Disk (tmpfs). I've only had experience with Fedora so I'm curious what function does that directory serve in Debian. Can it be used by user written shell scripts to cache stuff or is it off-limits and only for use by the OS? Thanks.
As others point out (this would have been a comment on their replies, but grew too long to fit the comment box) this is used by some initscripts, generally during the boot process, when your other filesystems may be read-only or even not yet mounted at all.
The filesystem is left mounted after startup has completed as initscripts that write there may be run at other times (if you manually restart a service, or switch runlevels). You should not force it to unmount in case the device/filesystem
While I do not see any harm in using it for your own scripts if your scripts are well tested and can be guaranteed not to completely fill it such that initscripts can't write there when they need to, you would be safer to create your own
If you do use a
Edit: I forgot to add... The other reason for creating your own
It is used by initscript requiring a writable namespace at the time /sbin/init is run. Remember, at that time your root partition might very well be readonly.