Automating Boot Camp via ISO/WinPE/WDS/MDT

draeconis
New Contributor II

Hi all,

Had an idea when I saw that you could install Windows via an ISO on some newer machines using BCA; this could be automated :). Instead of restoring a Windows ISO, I decided to attempt to restore a WinPE ISO, then image via WDS/MDT. I got together enough files in an ISO together with WinPE files to fool BCA into accepting this as a valid Windows ISO, and proceeded. Looked at the partition structure when BCA was partitioning the disk, and reverse engineered it as best I could. Unfortunately I'm getting a bit stuck.

Apple seem to create two partitions; 'OSXRESERVED', 8gig formatted as FAT32, and 'BOOTCAMP', size specified, formatted as FAT12(!). On a Fusion disk system this can appear on either disk0 or disk1, and it seems to make no difference. OSXRESERVED appears to be an area where the contents of the Windows ISO and 'WindowsSupport.dmg' (BootCamp support drivers) are restored to. This is then blessed by the system with the --setBoot and --nextonly attributes (and potentially others). Now that we know how this process looks, we can try it manually.

Machines that can perform this install-via-ISO method are all newer, and as such only support EFI booting (no legacy boot). Because of this, they also have a 'guard' or 'protective' MBR, rather than Hybrid for legacy installs. Subsequently, people like WinClone advise that the 4th partition that is seen by the MBR can't be partitioned as 'MS-DOS' (FAT) as the machine will assume a legacy mode, and on hardware that doesn't support this it will fail (I saw 0xc000000e errors in Windows Recovery Mode on boot). To get around this, advises WinClone, you can create a small HFS+ partition at partition 4 of 10 megs to push the volume you want to install from to partition 5; outside of the guard MBRs jurisdiction. This does indeed work, however, when looking at Apple's own manipulation of disk partitioning during the BCA sequence, this does NOT occur.

OSXRESERVED is MS-DOS formatted and sits in partition 4, BOOTCAMP is also MS-DOS formatted and sits at partition 5. If I recreate this exactly, the machine does not boot properly, but when run manually through BCA, this works every time. What makes it more puzzling is that when performed though the BCA tool, WDS runs our task sequence perfectly; as if booted from a USB device. When performed manually, WDS falters, and has issues installing Windows to the BOOTCAMP partition.

Has anyone else attempted this? Would be cool if it worked as it would mean WinPE could be booted without needing any physical media, and could be entirely automated.

1 REPLY 1

Look
Valued Contributor III

I did try this a while ago with rather similar results.
I think Apple has a way of flagging an internal partition so that it shows like an external device, we use SCCM and usually when you use USB bootmedia transferred to an SSD / HDD it fails because it's not on external media, why Microsoft make it bahve like this is beyond me as it would be far more useful if it didn't!