Imaging a Mac Computer with Bootcamp using Clonezilla
Creating an image for a Macintosh computer that includes both a Macintosh partition and a Bootcamp partition for Windows is complicated at best with the release of Lion and the demise of the old standby: Winclone. Â Since twocanoes stopped developing Winclone, I've been looking for another method to create an image that will be, well, reliable. Â While it is possible to use Winclone 2.3, it's not supported and it's very buggy. Â And that's just the Windows partition, not the entire drive, and I want the entire drive. Â So, based on some suggestions I got with previous posts and lots of online research, I decided to give Clonezilla a try.
Clonezilla is akin to Norton Ghost, as it grabs a complete image of a hard drive, partitions and all, and will restore it. Â Unlike other ghosting software though, Clonezilla supports HFS+, the Mac OS X Extended filesystem, as provided by the core utility, Partclone. Â That means it can image both a standard NTFS partition with the Mac partition. Â It sounds great, assuming it would work, so I thought I would test it out and see if it were a viable option for mass deployment of Mac with Bootcamp. Â Going through the motions, I was impressed with the repository settings that were available. Â Much like Acronis, the Clonezilla Live CD boots up into it's own OS platform. Â With Clonezilla, though, it's Linux, and it shows. Â There are a lot of options to select, and it doesn't have a very friendly UI. Â But, really, UI is secondary to performance in my case (because I'm used to a command line UI that it presents), so that wasn't much of a consideration.
The first neat experience I saw with Clonezilla was it's flexibility. Â You can select just about every language and keyboard setup that Linux supports, which makes it handy to deploy. Â Unfortunely, you need to do it every single time you boot. Â Perhaps there is a way to build a custom CD, or perhaps settings would be kept with the USB boot, but I didn't see it off hand. Â The other flexibility option that impressed me was the method of finding your repository. Â It's actually very easy to find a connection method that will work for you. Â I really liked the idea of having an SSH repository, making images easy to deploy to and from a remote server if necessary. Â The only thing to change performance at that point would be the speed of your connection. Â Internally, if you are on a Gigibit switched network, it will come as close to that speed as possible.
Then we get to the image tool. Â I only used the beginner options, which probably has a lot of settings that are defaulted, but I wanted to make this as easy as possible. Â That, and after spending a good 5 minutes on choosing my keyboard and setting up the repository information, I wasn't much interested in spending more time configuring when default settings should work just fine. Â Apparently you can back up just partitions, or the entire disk. Â I chose the entire disk because that was what I am looking for, but I kept the partition idea in mind for future projects (assuming it worked, of course).
Below are the steps I took while creating an image, and deploying that image to a computer.
Steps: Booting from the CD
- Boot to Clonezilla Live CD
- Select boot option for Clonezilla. Â The default works great at 800 x 600.
- Select Language (default is US English)
- If you are not using a USB keyboard, select the keymap from the arch list, otherwise continue with "Don't tuch keymap"
- If you selected to select the keymap, select your keyboard type (default is most common, QWERTY)
- Select the Keyboard layout (starts with Brazillian)
- Select your keyboard variant, either Apple USB or Standard
Now you are ready to set up the repository for your image.
- Select Start_Clonezilla
- Select Device-Image, as you would want to create an image from a device.
- Select your repository method.Â
- If you have a local device, like a USB drive or internal drive, you can use Local_dev
- If you have an SSH server you want to publish the image to, use ssh_server
- If you have an SMB server (Samba, or Windows server), this will be best for you
- If you have an NFS server (common in UNIX networks), nsf_server will work for you
- Depending on what you selected before, you need to verify your network connection (or not if it's local). Â I selected the Ethernet network (for speed), and then used DHCP. Â This will probably be the most common setup for everyone.
- Since I chose SSH, I entered in my SSH server IP (can use DNS name too), confirmed the port number, and entered in the user ID for the login.
- Then enter in the absolute path for the repository. Â I put it on my Desktop, so I put in Â /Users/userid/Desktop.
- It will then ask you for authentication information to mount the connection. Â Follow directions (hopefully you already know all this information).
You are now ready to start the image.
- Select Beginner mode. Â It's easy to use, and you don't have to mess with the expert stuff. Â If you already know what you are doing, then expert would be great. Â But then, if you already know what you are doing, why are you reading this?
- Select Action
- savedisk: Â Will image the entire hard drive as an image, with all partitions. Â This is what I chose for creating the image of my Mac with the bootcamp drive.
- saveparts: Â Will image partitions of the drive for restoration. Â If you don't need everything, just a single partition (like your Bootcamp partition), this will back up just the partition. Â Obviously this will save you time over the entire disk if you have more than one partition.
- restoredisk: Will restore the drive from an image.
- restoreparts: Will restore individual partitions.
- recovery-iso-zip: Will create a recovery disk of Clonezilla Live for either CD or as a zip for a bootable USB drive.
- chk-img-restorable: Â will check to see if an image is restorable or not. Â This is an option you can turn on while creating the image, so it will be checked after the image has been created.
- Input the name you want for your image.
- Select the disk or partition you want to back up
- Choose to either check the image as it's saved, or skip the check. Â I recommend letting it check the image (increased my image time by 15 minutes, but well worth piece of mind)
- Press enter to continue.
At this point, you are all set! Â Clonezilla will create an image of each partition in the hard drive (or just the one you selected), and notify you how long for each partition it will take to back up and restore. Â It took, for my two images, a total of about an hour and a half to back up and restore the image using SSH and the options I selected above on a Gigabit network.
To restore, it's much the same process. Â Boot to the drive, select your language, etc., and set up your device repository. To restore, you would use these steps:
- Select Beginner mode.
- Select restoredisk (or restoreparts, if you backed up a partition)
- Select your archive as displayed
- Select the drive you wish to image.
- Press Enter to continue.
- It will then ask you if you want your hard drive partitions overwritten, type Y to continue. Â It will then verify that you are wanting to replace your hard drive partitions, type y.
- The system will now restore.
The restoration process is done partition by partition, with each partition taking less time to reimage than it took to create the image in the first place. Â And the results? Â Success! Â The restore booted without a problem, with all settings in tact. Â That is better than could be said for the previous imaging tools I have tried.
So it looks like I have found a useful cloning tool for imaging my Macintosh computer lab, and pretty much any lab for that matter.