Mac OS X and the ram disk dilemma

Apparently something changed on a recent update. I had a script that used to the following:

  hdid -nomount ram://size
  newfs_hfs -v "Volume Name" /dev/rdiskX
  hdiutil mount /dev/diskX

That doesn’t work any more. It appears that now there is a partition map expected to be on the volume, if you want ‘hdiutil mount /dev/diskX’ to work. You can, alternatively, use ‘mount’ to mount the device. However, if you want to use ‘hdiutil mount’, you can partition the ram disk by doing the following:

  disktool partitionDisk diskX 1 HFS+ "Volume Name" <size_in_mb>M

I wish they wouldn’t change behaviors like this so willy-nilly.