Tuesday, November 6, 2012

Bootable external drive for Windows & OSX

This is how I created a bootable external drive with two partitions: One for WDS/Ghost etc. and the other for OSX install disk. For my drive, I've got a custom WinPE startup OS, and the OS 10.8 install image. The end result is an external drive that I can use to image or backup almost any computer that I come across. Below are the steps that I took to create the drive, but I'll cut to what I got hung up on: The Windows partition must be Active or your machine won't boot to it. Restoring the OSX image will remove this from the NTFS partition.

1. Create your Windows partition. (these steps can also be done in disk management)
  1. Run CMD as an administrator (you must right click on CMD and run as administrator, not just be logged in as an administrator) 
  2. In CMD, run diskpart 
  3. list disk 
  4. select disk <#>  
  5. clean (! will remove all current partitions !) 
  6. create partition primary size=<n> (MB) 
  7. active 
  8. format fs=ntfs quick  
  9. assign letter=<L> (drive letter you want) 
  10. create partition primary (this will be the 2nd partition for OSX with the remaining space on the disk) 
  11. exit 
  12. After the volume is visible in the OS, you can copy your bootloader files over etc. 

2. Mac partition. You'll need to remove your drive from Windows, and plug it in to a Mac. 
  1. Open the Disk Utility, you'll see the drive with two partitions. The first partition is the NTFS one that we just made, and the second is the partition that we created, but haven't formatted. 
  2. Locate the InstallESD.dmg file for OS 10.8. If you have the installer, it is located inside package contents in /Contents/SharedSupport/ 
  3. In the Disk Utility, select File > Open Disk Image, and select the InstallESD.dmg file 
  4. Mount InstallESD by double clicking on it inside of the Disk Utility 
  5. Select the mounted image (Mac OSX Install ESD), and click on the Restore tab 
  6. Drag the 2nd partition to the Destination, and click the Restore button 
  7. After the image has been restored, you can copy additional files to the partition 


3. Fix the first partition. OSX may have made the windows partition non-active, meaning when you try to boot to it, it will default to the second (Mac) partition. 
  1. Remove the device and put it back in a windows machine. 
  2. In the disk management utility, or diskpart, make the partition active 
  3. In CMD: list disk, select disk <#>, select partition <#>, active


Windows Disk Management

OSX Disk Utility