Since its move to online purchasing and distribution of its operating system software, Apple has no longer included gray recovery DVDs with its Mac systems. Instead, if you wish to reinstall OS X you simply reboot to the OS X Recovery HD and use the tools there to format your hard drive (should you choose to), then run the installer to download OS X from Apple's servers.
While convenient for those with fast broadband connections, sometimes you may find yourself in a location without fast Internet and would benefit from having a way to reinstall OS X from scratch. Granted, the use of Time Machine makes restoring from backup relatively easy, but if for some reason you need to repartition the hard drive or install a new one on your system, you will first need to install OS X again.
One easy option (which I have discussed before) is to purchase OS X from the App Store, then. However, this requires you to purchase a separate license of OS X. The copy of OS X that is included with your Mac is not considered a retail purchase, so unfortunately you will be able to access it only through Apple's installer. However, there is a small workaround that you can use to capture this copy and put it on a USB drive for use offline.
Apple Discussion Communities member "keg55" outlines the method for doing this, which involves installing OS X to an external drive, then removing the drive before the installer can complete, thereby preserving the installation image.
- Get an 8GB or higher USB drive and plug it into your Mac.
- Restart to Recovery mode by holding Command-R at startup. (Internet Recovery by including the Option key here will also work.)
- Choose the option to Install OS X and select the USB drive as the destination.
- Proceed with the installation and monitor the download. When your Mac automatically restarts, it will display a black screen with no video output for a second or two. At this point, unplug the USB drive.
With the drive unplugged, your Mac will boot normally to its internal drive. Now you can reattach the external drive, on which you should see a folder called "OS X Install Data" that contains a disk image file called InstallESD.dmg. (If this is missing, then you likely waited too long to unplug the drive.) Copy this file to your computer, then use Disk Utility along with theto restore the contents of this image to your USB drive.
Once finished, you should be able to reboot your system with the Option key held down, then choose the USB drive which will load the OS X installer and allow you to reinstall OS X without the need for connection to the Internet.