Creating and restoring OS X disk images

Oct 07, '03 10:03:00AM

Contributed by: mccallister

Here are some easy step-by-step instructions I wrote to create OS X images and how to use those images on other Macs. Some may question the need for two partitions on the target. In our scenario, the users authenticate via LDAP, have a disk quota of 100MB, and I need to give them an alternate location to temporarily store large files for video editing. Feel free to utilize, alter, and plagiarize to fit your situation.

[robg adds: Of course, if you're cloning OS X images, make sure you have licenses for all the machines on which it's being installed. For our use, Apple's five-user family package seems perfect, and it's a great excuse to say "but we need two more Macs to use up our quota!"]

Creating OSX Images and Restoring Images

Preliminary Steps

  1. Download Mike Bombich's Carbon Copy Cloner and NetRestore.
  2. Download BootCD.
  3. Ensure the source computer to image has two partitions.
  4. Copy Carbon Copy Cloner, NetRestore, and BootCD applications to the source computer.
Create an OS X bootup CD
  1. Open the BootCD program.
  2. During the creation of the CD, it will ask for software to be added to the image. Select the Disk Utility, Carbon Copy Cloner, and NetRestore programs. You can add other utilities as you deem necessary. The programs will appear in your dock when you boot off of that CD later.
  3. BootCD will create a DMG file.
  4. Use Disk Copy to create a CD from the DMG file.
Creating an Image
  1. The source computer must have two partitions. You will find less discrepancies with your restore images if the source has two partitions. I find it easy for consistent dock preferences to name the first partition "HardDrive� and the second partition "TemporaryStorage").
  2. Boot the computer off the drive you want to create an image of (HardDrive). If you boot off of some other source you may encounter restore discrepancies.
  3. Open Carbon Copy Cloner
  4. Select HardDrive for the source
  5. Select TemporaryStorage for the target
  6. Click on Preferences
  7. Check Repair permissions before cloning
  8. Check Create a disk image on target
  9. Check Prepare for apple software restore
  10. Click on Save
  11. Click on the lock icon
  12. Enter your administrator password
  13. Click on OK
  14. Click on Clone
  15. Copy the harddrive_asr.dmg file on TemporaryStorage to a network share or a firewire drive.
Restoring an Image
  1. Boot off of the OSX Bootup CD that you created. It may take up to 15 minutes to fully boot from the CD, so go have a cup of coffee.
  2. Optional step: Open disk utility and partition the drive into two equal partitions (HardDrive and TemporaryStorage). See notes above.
  3. Connect to the source (network share, firewire drive, etc) that has the image (see step 15 above).
  4. Open NetRestore
  5. Drag and drop your DMG image file to the source field
  6. Select HardDisk (or whatever the hard drive's name is) for target
  7. Check all options
  8. Hold down the Apple and Shift keys and press the P key to set post restore options
  9. Give the target computer a name. You can also specify an open firmware password.
  10. Click on Restore
  11. The computer will restart after the restore. I recommend doing a subsequent restart especially if the computer is configured to authenticate via LDAP.
That's it, you're done. Go surf macosxhints.com or slashdot.org or pester the signficant other.

Comments (15)


Mac OS X Hints
http://hints.macworld.com/article.php?story=20031001224049884