Create a RAM Disk in Mac OS X
March 23rd, 2007 - How to, Mac OS X, Tips & Tricks
Another great tip from one of our readers, Stephen Adelson writes: “Back in Mac OS 9 and earlier you could make a RAM disk, a temporary disk that was super fast because it was read from system memory, or RAM, and not a relatively slow moving hard drive. In Mac OS X the feature has been removed from an easy GUI interface, but you can get the same effect and create your own RAM disk directly by typing the following commands in any terminal window.” Follow Stephen’s instructions below to create a 50mb RAM disk:
Type the following exactly in the Terminal (the $ represents a bash prompt and is not to be typed):
$ hdid -nomount ram://52428800
$ newfs_hfs /dev/disk1
$ mkdir /tmp/ramdisk1
$ mount -t hfs /dev/disk1 /tmp/ramdisk1
to ditch the RAM disk and unmount it, just type
$ hdiutil detach /dev/disk1
Thanks Stephen!
Create a RAM Disk in Mac OS X 10.5 or later
Some users report that the above instructions are not working to create a RAM disk in OS X 10.5 or later, if you have troubles with the above commands, try the following to create a 550mb RAM disk:
diskutil erasevolume HFS+ "ramdisk" `hdiutil attach -nomount ram://1165430`
This has been tested and works in OS X 10.5.8, note that to remove the RAM disk you can simply eject it from the desktop as you would any other disk.
Posted by: Editor

Order Mac OS X 10.6 Snow Leopard today from Amazon.com - $25!

Write a comment