Sometimes it comes in handy to have the ability to reinstall your OS without an active internet connection, which is required by the built-in recovery partition of your Mac. I have found a Terminal command that allows you to do just that.
First, you will need the install image. This is available for download from the App Store. Once you download the image, all you need to do is open Terminal and enter the following command:
sudo /Applications/Install OS X Mavericks.app/Contents/Resources/createinstallmedia —volume /Volumes/Untitled —applicationpath /Applications/Install OS X Mavericks.app —nointeraction
In this example, I am using the default download location for these, which is your Applications folder. If you have the image saved somewhere else, you will need to create the path to that. Also, “Untitled” is whatever the name of the drive you will be installing this image to, so make sure to adjust that accordingly.
What this does is takes the files from the installer and images them to your flash drive, allowing you to create an external installer. This will come in handy if your hard drive ever fails and you want to reinstall the OS and you don’t have the recovery partition. To my knowledge, this command will only work in 10.7 or higher.
Note: Be sure to follow all of the normal Terminal warnings before trying!
Feedback? Email me!