This post details how to capture a windows bootcamp partition installed on a mac to be restored on other macs running OS X while keeping the dual-boot option.
What you’ll need:
- A windows bootable USB stick
- A second USB stick or external harddrive for the bootcamp image (32GB or larger)
- OS X with bootcamp version 5 or above
- USB 3.0 recommended due to large file sizes (25GB+)
If you haven’t already, create your bootcamp windows and configure it as you’d like it to be imaged, then in OS X go to disk utility, click on ‘New Image’ and save it to the external harddrive(or usb) in read-only format.
Once you have your .dmg image of the windows drive you’d like to replicate, go to the machine you want to image and plug in your bootable windows USB drive. Start boot camp assistant and when you get to the tasks screen, select only the third option.
Resize your drive how you see fit, bootcamp is primarily needed to create the fake partition table for Windows later on.
When the machine reboots after install hold down the ‘option’ key and select the recovery drive from the boot options. If you missed the option key on reboot, just power off and back on again.
Start disk utility and click on the recovery tab, then click on image… and open the .dmg image file of your bootcamp image created earlier.
The Bootcamp image should now be on the left hand side, double click on it to open/verify the file.
Once the file opens, click on the newly opened bootcamp file on the left and then go to the ‘restore’ tab, selecting your bootcamp partition as the destination to restore. Click the ‘restore’ button.
Once complete, reboot and hold down the ‘option’ key again, boot into the bootable windows USB stick.
When windows boots, select ‘repair your computer’
Go to advanced options and click on ‘command prompt’
In command prompt enter diskpart, select the main disk, select the windows boot partition (200MB) and then enter ‘assign letter=z’ before exiting diskpart.
Finally enter ‘bcdboot C:\Windows /s z: /f UEFI’ to have windows create the missing boot partition after we imaged the drive with disk utility.
DONE! When you restart just hold down the ‘option’ key one last time and select ‘Windows’ from the boot options to boot into your newly imaged windows bootcamp partition on Mac OS X.