Mountain Lion (OS X 10.8) is very old, no longer supported by Apple, and most modern Macs cannot run it. This guide is for legacy hardware only.
This does the same thing as the asr command. mac os x mountain lion bootable usb download
If you are creating the USB from a Mac running Mavericks (10.9) or newer, the createinstallmedia command might still work if you locate the binary inside the Mountain Lion app. Try this: Mountain Lion (OS X 10
Apple still hosts a copy of (Mountain Lion 10.8) for users who have previously purchased it. Here is the legitimate, direct support link: no longer supported by Apple
After running this, asr will verify the image and restore it byte-for-byte. This creates a of the original Mountain Lion installer DVD.