Mounting a RAM disk on startup, but seems to be unmounted automatically I wrote a simple script that mounts a ram disk:

%&gt; cat /System/Library/LaunchDaemons/ramdisk.plist
&lt;?xml version="1.0" encoding="UTF-8"?&gt;
&lt;!DOCTYPE plist PUBLIC "-//Apple//DTD PLIST 1.0//EN" "http://www.apple.com/DTDs/PropertyList-1.0.dtd"&gt;
&lt;plist version="1.0"&gt;
&lt;dict&gt;
    &lt;key&gt;Label&lt;/key&gt;
    &lt;string&gt;Ramdisk&lt;/string&gt;
    &lt;key&gt;ProgramArguments&lt;/key&gt;
    &lt;array&gt;
        &lt;string&gt;/usr/local/bin/setup_run_shm&lt;/string&gt;
    &lt;/array&gt;
    &lt;key&gt;RunAtLoad&lt;/key&gt;
    &lt;true/&gt;
    &lt;key&gt;UserName&lt;/key&gt;
    &lt;string&gt;root&lt;/string&gt;
&lt;/dict&gt;
&lt;/plist&gt;


But when I logged in, the disk is gone. It looks like the disk is unmounted. 
I'm not really sure why. According to /tmp/log.1 there's no errors.

P.S attached the setup_run_shm script:

%&gt; cat /usr/local/bin/setup_run_shm
#!/bin/bash

exec &amp;&gt; /tmp/log.1
date
set -x

size=$(( 1024*1024*8 ))
path=/run/shm/
name="SHM"

if mount | grep -q '/run/shm'; then
    echo RAM disk already exist.
    echo 'Eject the disk and try again. (e.g hdiutil eject /dev/diskX)'
    exit
fi

disk=$(hdiutil attach -nomount ram://"$size")
echo Attached RAM disk $disk

newfs_hfs -v "$name" $disk
echo Formatted RAM disk with name $name

mount -t hfs $disk "$path"
echo Mounted ram disk of size $size to $path
Not really sure whether this is truly an answer to your question, but this Applescript works for me, run as an App.

set RAMDisk to "RAM_Disk" as text
tell application "Finder"
    if not {exists disk RAMDisk} then
        set VolumeName to RAMDisk
        set SizeInMB to 1024
        set NumSectors to ((2 * 1024 * SizeInMB))
        set DeviceName to do shell script "hdid -nomount ram://" &amp; NumSectors
        do shell script "diskutil eraseVolume 'HFS+' '" &amp; VolumeName &amp; "' " &amp; DeviceName
        do shell script "SetFile -a V /Volumes/" &amp; VolumeName       
    end if  
end tell


It needs Developer Command Line Tools installed to run, but will ask &amp; auto-install if not present.