Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!

Creating and restoring OS X disk images Install
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.
    •    
  • Currently 3.25 / 5
  You rated: 5 / 5 (4 votes cast)
 
[124,161 views]  

Creating and restoring OS X disk images | 15 comments | Create New Account
Click here to return to the 'Creating and restoring OS X disk images' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Creating and restoring OS X disk images
Authored by: seann on Oct 07, '03 01:26:01PM

so..netbooting a netinstall.

any takers?



[ Reply to This | # ]
Other boot methods
Authored by: matx666 on Oct 07, '03 08:06:54PM

Of course, if you're lucky enough to have an Xserve setup with Netboot (using Netrestore Helper app to create this Netrestore boot image) then you can boot in a minute or so (instead of the 12-15min required by bootCD.

Or use a FireWire drive with a system on it to boot from.

Also, now a new option is Panther install CD1. In disk utility there is a new "restore from image" option. this cd boots in a minute too.

cool

-x



[ Reply to This | # ]
Other boot methods
Authored by: seann on Oct 08, '03 05:54:37PM

true story..

Just lookin for some war stories on people who've setup netboot or install on os x server.



[ Reply to This | # ]
Creating and restoring OS X disk images
Authored by: hunty on Oct 07, '03 10:34:50PM

err or you could just boot the machine from another source firewire or cd (if ya got hell time to spare) and drop into terminal and go

sudo asr -source (drag in the source image) -target (drag in the target drive) -erase -nocheck

Done, lot quicker than messin round with netrestore, netrestore works really really well when it does fully automated restores over a network or from a restore dvd, i have built quite a few automated restore dvd's as in chuck in the dvd choose it as the startup disk have a coffee come back in about 25-30 mins and its restored only prob with this is the 4.4Gb limit take out 600 odd meg for the netrestore system and it gives you about 3.7-3.8Gig for an image



[ Reply to This | # ]
Creating and restoring OS X disk images
Authored by: mccallister on Oct 07, '03 11:25:24PM

Does that copy over the resource forks?



[ Reply to This | # ]
Creating and restoring OS X disk images
Authored by: jonahx on Oct 08, '03 08:50:31PM

yes it does. ASR does block file copies as long as the image being used is prepared as an ASR compatible image file. Best done as read only/compressed. Restores are much faster.

NetRestore is really a gui front end to the command line ASR that Apple included since 10.2.3



[ Reply to This | # ]
Booting from OSX Server CD
Authored by: nox on Oct 09, '03 01:18:15PM
At our School District, I'm the Only Tech we have. After we put an order for 160 eMacs, I had to come up with an efficient method of cloning them. I found the following the best method for me. First I booted off the OSX 10.2 Server CD , this gave me access to a terminal session. Second I Attached a Firelite Firewire Drive with my image ( of course my image was done via CCC ). I also made a simple SH script to Automate the ASR command and switches. The whole process takes under 10 minutes for a 3.3 GB image. The following is my simple script , that helps ....

#!/bin/sh # ASR Image Bash Script # Manuel Plascencia Alhambra School District # Apple System Restores from "Source" Macintosh_asr.dmg to "target" /Volumes/Macintosh\ HD/ (Make sure Target Volume has the correct name) # -erase "erases target volume first" # -nocheck "skips checksum" ( this will cut your cloning in half ) # -noprompt "will continue cloning with other user interaction" asr -source Macintosh_asr.dmg -target /Volumes/Macintosh\ HD/ -erase -nocheck -noprompt #Put a Stupid message Echo Alhambra School District !!!! Echo Echo Done !!! Echo Echo Enjoy !!! #This will reboot machine once cloning is complete. #You will hear the reboot chime which will give you #notification of clone completion. Reboot

[ Reply to This | # ]

Readable Script
Authored by: nox on Oct 09, '03 01:30:46PM

Script got screwed up , heres the script again below
Remember to chmod +x "yourfile" after script is made.
This Script is assuming that the image is located in the same directory, and it is running of a firewire drive. From terminal prompt I type :

cd /Volumes/Firewire
./go ( I've named my script go , but to run it you must type ./ in front )



#!/bin/sh
# ASR Image Bash Script
# Manuel Plascencia Alhambra School District

# Apple System Restores from "Source" Macintosh_asr.dmg to "target" /Volumes/Macintosh HD/ (Make sure Target Volume has the correct name)

# -erase "erases target volume first"
# -nocheck "skips checksum" ( this will cut your cloning in half )
# -noprompt "will continue cloning with other user interaction"

asr -source Macintosh_asr.dmg -target /Volumes/Macintosh HD/ -erase -nocheck -noprompt

#Put a Stupid message
Echo Alhambra School District !!!!
Echo Echo Done !!!
Echo Echo Enjoy !!!

#This will reboot machine once cloning is complete.
#You will hear the reboot chime which will give you
#notification of clone completion.

Reboot

#End Script

Hopes this helps someone.



[ Reply to This | # ]
Readable Script
Authored by: seann on Oct 10, '03 04:17:48AM

don't you'd think you'd benefit from netbooting the install images, and installing them over the network, rather than lug a drive around?



[ Reply to This | # ]
Lugging around
Authored by: nox on Oct 11, '03 02:07:52PM

Firewire drive fit in your pocket , and they weigh nothing . Besides all 150+ eMacs are in one location , in boxes. Netboot would be 4 times as slow and that is not including the Bandwidth that would be shared with X amount of eMacs , cloning would crawl unless i had a Gigabit Switch. in comparison, firewire is the Best solution.



If Symantec or Apple , made a Cloning program that would be close to " PC GHOST" that would be awesome. Multicast Broadcast Cloning , Over a Gigabit Switch would be FAST. Or if Apple would include Firewire Over IP in the ROM then I could Daisy chain A bunch of emacs to one Firewire Drive . Theres So many ways just the Tech is not here ...



[ Reply to This | # ]
What about old iMacs?
Authored by: mdale7 on Oct 11, '03 08:20:08PM

This method is all well and good, assuming that the machines are all Firewire enabled. What about older iMacs or the non-DV models. I was physically taking out the drives, putting them into a firewire bay and using Carbon Copy Cloner to clone them from a master drive.

Not only did this take hours (I did 65 iMacs), but added the possibility of damaging the machines.

We don't have an XServe or anything fancy at this particular school site, so is there some tricky command line work around?

Thanks,

M@



[ Reply to This | # ]
What about old iMacs?
Authored by: mccallister on Oct 18, '03 11:39:44AM

Create a bootup OSX CD as mentioned, boot up the old iMac from that CD, and connect up to a network share that has the image.



[ Reply to This | # ]
Creating and restoring OS X disk images
Authored by: nox on Oct 20, '03 02:03:10AM

In that case i would netboot , or maybe create an image on a DVD-R thats bootable to a CLI , and start ASR.



[ Reply to This | # ]
Creating and restoring OS X disk images
Authored by: rosewoodblues on Oct 22, '04 11:25:58AM

? I am migrating to a powerbook and selling my G4 Tower. can i CCC my system and re-install the applications, etc. to my powerbook? Has anyone else done this and/or have an idea of going about it?

thanks in advance,
ken;



[ Reply to This | # ]
Give SuperDuper! a try
Authored by: mangomanj on Oct 22, '04 12:26:44PM
I've playing around with this for about a month and am really happy with the results. I work for a very large, well known software company and need to re-image my computers many times a day. I haven't found anything that works as fast as SuperDuper! Most of my images include applications that are installed on them, so they are frequently 4+ gigs in size. It takes about 25-30 mins to create the image (on a G5 dual 2ghz) and about 2 mins to restore a volume. As far as data integrity, it been great. I also tested it using a 38gb volume and created and restored with no problems. The best part is you can use the demo in it's limited functionality as long as you want (says so on the website). I do plan on purchasing it, but I did want to say for basic functionality, SuperDuper! has met my basic needs. Get it here: SuperDuper!

[
Reply to This | # ]