fs2ram(8) manage post-mount/pre-mount scripts


fs2ram action -a [-f] [-q]

fs2ram action <mountpoint> [-f] [-q]

fs2ram -h


fs2ram manages temporary file systems across reboots. Each tmpfs <mountpoint> can be associated with a pre-mount script, which is executed by fs2ram at each shutdown/reboot before the file system is unmounted. The pre-unmount script must print a post-mount script on standard output, which is saved and then run at boot time after fs2ram mounts the corresponding file system.


This option specifies the action to execute. It could be :
This action first execute-unmount-script and then unmount.
This action first mount-only and then execute-mount-script.
This action mounts the filesystem given in parameters.
This action unmounts the filesystem given in parameters.
This action executes the unmount script corresponding to the mountpoint given in parameters.
This action executes the mount script corresponding to the mountpoint given in parameters.
This option tells to do action for each <mountpoint> specified in /etc/fs2ram/fs2ram.conf
This option tells to be quiet (only warning/error).
This option tells to display the command usage.
For the action unmount and mount, this option tells to proceed execute-mount-script/unmount respectively even if mount/execute-unmount-script failed. This option has no effect for the other options.


By default, fs2ram won't make /var/run, /var/lock or /tmp available as ram filesystems. Since sysvinit provides a way to achieve this, it is preferable to use it. See tmpfs(5) for more information.


An unmount script has to produce to the standard output the mount script that fs2ram will execute at boot. The unmount script takes two arguments. The first one is the concerned mountpoint. The second one, optional, is the options given to the script. The default unmount scripts are in /lib/fs2ram/unmount-scripts/


Mountpoints configuration file,
Default unmount scripts used by fs2ram,
User-defined unmount scripts used by fs2ram,
Script executed at runlevels S/0/6,
Mount scripts created by fs2ram.


fs2ram was written by Philippe Le Brouster <[email protected]> for the Debian project (and may be used by others).