Deploy Windows on Macs using MDT 2010.

[Edited for Mac OSX Lion, thanks to Ted.]

Deploying Windows on Macs is a bit complicated since they don't support standard PC features like PXE. Considering you have one-and-only one Mac OS partition (usually Macintosh HD), running the Boot Camp installer creates a fourth partition on Disk0 (Disk0\Partition3 or Disk 0\Partition4 if you're running Lion).


MDT lets you generate boot CDs for unsupported hardware. Make sure you include BroadcomMarvell and Nvidia Ethernet drivers into your driver repository.

  1. Go into your deployment share (Deployment$\Scripts) and create a file named DiskPartMac.txt then insert the following contents into it:
    SELECT disk 0
    SELECT partition 3 or SELECT partition 4 if you're running Lion
    FORMAT FS=NTFS LABEL="Bootcamp" QUICK
    EXIT
  2. Create a standard Task Sequence in the Deployment Workbench, chose the OS you want to install.
  3. Under Preinstall\New Computer Only, delete "Format and Partition Disk".
  4. Still under New Computer Only, create a command line action by clicking "Add" at the top then "General", then "Run Command Line". Rename it to "Custom Mac Format" and input the following command:
    diskpart /s "%scriptroot%\DiskPartMac.txt"
  5. Move it between "Validate" and "Copy scripts".
  6. Click on "Install Operating System" under "Install" and configure the target partition as Disk 0 Partition 3 or 4 if you're running Lion:
You're done.

Namaste.

19 comments:

Hey thanks for this guide (so far you're the only person on this planet to offer a solution to deploying Windows to Macs using WDS), but my deployment fails at the formatting stage. The disk is not formatted and I must manually format it for the deployment to work (when I run the diskpart commands manually the disk is formatted correctly).

Can you think of anything that's wrong in your process?

Thanks again.

I would check if the script is in the right place and accessible in the deployment process. It's still working for me.

I followed your exact instructions and the script is exactly where you instructed it should be.

Can you think of another reason the deployment fails at the formatting stage? It doesn't like something about that step and I can't tell what it is...

I really appreciate your help and you seem to be the only person to figure this one out...

Thanks!

Have you prepared your machines with the Boot Camp assistant, or created the partition?

I prepared the machines with with the Boot Camp assistant

Here is my ask sequence, there not much more I can do.

http://rapidshare.com/files/447296714/ts.txt

Thanks for your TS, I don't know where the task sequence files are stored though so I can't use it...

At any rate, just thought it'd be interesting to mention something interesting:
I received recently two new MacBooks I deployed Windows 7 x64 onto. To perform the deployment, I used MDT 2010 on an ISO and the task sequence I created according to the instructions you posted in this blog post. One was a Core 2 Duo MacBook Air 13" and the other was a 2011 Core i7 MacBook Pro 13", both with a 256GB SSD (the MBP is screaming fast btw!).

With the MacBook Air, the task sequence failed at the disk formatting stage forcing me to manually format the partition to complete the installation. This is the same experience I had with other Macs (a 2010 C2D MacBook Pro 13" and a late 2009 iMac). With the 2011 Core i7 MBP however, the task sequence worked flawlessly without failing at the disk formatting stage.

I believe therefore that the issue with the disk formatting failures are caused by inconsistencies in Apple products rather than an issue with MDT or your instructions. This also explains why you haven't experienced this issue, probably because you weren't using the same Apple models I've been using.

Put the "OVERRIDE NOERR" in the format command will solve your problem.

FORMAT FS=NTFS LABEL="Bootcamp" QUICK OVERRIDE NOERR

This guide was great for my older MacBooks but the latest don't use Marvell network drivers but use Broadcom. I found these drivers in the Bootcamp drivers download. I had to put them into MDT and remake my ISO with the updated drivers to get the network to work in the newer MacBooks (purchased August 2011). Hope this helps someone that is having the problems I did.

Thanks for pointing this out, I updated the article with a link to Broadcom's download page.

I'm using a new (2011) mac mini with no CD/DVD Drive. I use Boot Camp in OS X to make the partitions, and I can successfully deploy windows 7 while keeping OS X. I have found that partition 4 is the target drive. This is because there is a partition called restore.

I changed to partition 4 in my task sequence, and in the diskpartmac.txt file and it started working.

When you have your mac booted into MDT, click F8, and check which partitions are in use.

Diskpart
Select Disk 0
List Partition

I updated the article to reflect your comment. Thanks for the help.

-- Ted

How did you boot MDT on the Mini's with no optical drive? External USB CDROM?

External SuperDrive works fine.

- Ted

How did you boot the Mini into MDT with no optical drive? External USB CDROM?

Because I could not get the machine to boot off a bootable HDD/Flash drive connected via USB and of course there is no PXE.

- Guillaume

Woops double posted.

Ahh ok. Guess I will have to order one then. We boot camp a few machines where I work. Using MDT to install the boot camp just like we install every PC we have makes things TONS easier.

Came across this:

https://support.apple.com/kb/HT3802

About to test it to see if it will work in WinPE. Just incase you forgot to change the boot disk before starting WinPE so when it does the reboots it goes back into the windows partition not OS X.

This comment has been removed by the author.

Hey guys - Ted here.

With the macs that I used, I was able to boot from a thumb drive. These were the newest versions of the Air, and the newest Mac Minis.

Twitter Delicious Facebook Digg Stumbleupon Favorites More