To make a bootable USB disk with the Mac OS X installer, the guides I found are much too verbose for my taste, and have too many cute screenshots and ads. Here is a summary for the impatient.
For Mavericks, Yosemite and El Capitan
There is a handy "createinstallmedia" command.
The only difficulty is getting the installer, which must be downloaded from the App store. If you need an older installer than the current version, the only way seems to be to find it in the "purchased" page.
The downloaded installer image is automatically started. If you proceed with the install, it will be deleted afterwards. So copy it before installing or just close the installer.
- Get a USB disk of 8GB or more.
- Create a single GPT (GUID) partition on the USB key, and format it. This can be done in Disk Utility, but command line junkies can also do it this way:
diskutil list ## check which is the device name to format disk=/dev/diskX ## USE CORRECT DISK found with previous command echo "This will completely destroy '$disk'" # diskutil partitionDisk $disk GPT hfs+ Untitled 100% ## Remove leading dash once you are sure
- Define variables for the installer location and your USB disk:
("/Volumes/Untitled" is the mount point of your USB key, which will be erased.)
installer="/Applications/Install OS X Yosemite.app" USBdisk="/Volumes/Untitled"
- Then run:
sudo "$installer/Contents/Resources/createinstallmedia" --volume "$USBdisk" --applicationpath "$installer" --nointeraction
For older versions like (Mountain) Lion
The installer disk image can be found in Applications / Install Mac OS X Lion.app (right-click -> Show Package Contents) / Contents / SharedSupport / InstallESD.dmg
- Open InstallESD.dmg. You get a "Mac OSX Install ESD" disk on the desktop
- Partition and format the (8 GB.) USB key as standard Mac OSX Extended with journal. (The partition table defaults to MBR for USB drives; that's OK)
- In the "Restore" tab of Disk Utility:
- the source is the mounted image on your desktop: "Mac OS X Install ESD" (NOT the .dmg file)
- the destination is your new USB Mac partition (not the drive itself)
Other instructions suggest using the InstallESD.dmg file as the source, and the USB key itself (not the partition it contains) as the destination. That may work too. Just don't mix both methods. I had tried that and failed, but maybe it was because I had first made a GPT partition table instead of MBR?
If you only have a 4GB key, it seems to work using Carbon Copy Cloner and de-selecting all unneeded language packs. But I haven't tried an install from such a key.