The `-kernel’ flag is needed since 10.5 (??):
MFS=$(/usr/bin/hdiutil attach -kernel -notremovable -nomount ram://2200000) &&
/usr/sbin/diskutil erasevolume HFS+ web-ram "$MFS"
NB: Per the hdid(8) man page, $MFS can be unmounted, but its backing RAM is wired and cannot be reclaimed “cleanly” without reboot.
Recent Comments