I am currently charged with imaging around 30 iMacs with Windows 7 x64 using the Boot Camp partition.
MDT 2013 with Litetouch Deployment
I started with this discussion that @franton posted on the issue:
From that discussion I was able to use this link for help:
However, I am unable to get my image to set properly. I can view slice four inside of the Litetouch deployment using diskpart and both list-partition and list-volume show me that I have the partition setup correctly.
After Litetouch restarts after the image is installed I get, "No operating system could be found."
When I go to view it on the Mac side though, the partition is still exFat and named "Untitled." A single file is viewable for the content of the partition.
Has anyone else been able to successfully image using MDT 2013 or WDS? If so, could you please provide me with some details on how you were able to accomplish it?
Any help would be greatly appreciated.
A blast from my past!
Well we ended up giving up on litetouch deployment completely. We found it wasn't creating the hybrid MBR that the Mac requires for it to work properly. We now create a sysprepped deployment image and capture with Winclone.
Winclone 4 now has tools built in that can "repair" the faulty MBR structure and even fix and EFI boot issues on Windows 8 + macs capable of EFI windows booting. (That's 2013 computers onwards I think).
Believe me it's the easiest method.
I would like to know if anyone out there has gotten this to work properly, as we are moving to this in order to have a single build to deploy across both our PCs and Macs (Win 8.1).
I can get the partition created successfully and MDT properly applies the OS image, but the Mac just can't seem to see the partition as bootable. I even added a step in the TS to set the partition as active, but didn't help. Then, I set up another step to run the "BCDboot" command, and now it sees it as a bootable partition, but then tells me that there isn't any operating system found. I have verified that all of the files are indeed on the drive.
I'm getting so close, but am still so far away.
I am using SCCM 2012 R2 to put the Windows image on the dual boot Macs on my campus and I have seen a similar situation there. The image is successfully applied but not bootable. I ended up installing rEFIt on the OS X side which could then boot the Windows side and then finish my image process. Once Windows was finished, I remove rEFIt and everything works as it should. I am using Munki to install and remove rEFIt but I am assuming it could be done with Casper as well.
That's exactly what we used to do. As I mentioned before, the hybrid MBR that Mac hardware requires is a major stumbling block. When all Mac hardware supports EFI booting of Windows (version 8 upwards as of time of posting), this issue should disappear.
rEFIt is depreciated in favour of rEFInd anyway. It exposes a whole bunch of low level stuff that in an educational environment (like where I am), you do not want to expose.
I am SO close to having this done. I think I've got it all situated for the older Macs, that support Legacy BIOS, but with the new MacPro and their EFI only, it's been much harder. I can deploy Windows to the Mac, but the TS can't seem to get access to the Mac's FAT EFI partition to copy the boot loader files.
Anyone know if there is a way to make a Casper package to copy the proper boot loader files into the Mac's EFI partition? I'm hoping if there is a way, it would solve my problem.
I wanted to post this fix for anyone (who has been tearing their hair out) deploying Windows to duel boot iMacs via MDT or SCCM who can't get their Windows partitions to show up as a bootable device on OSX's boot screen. Long story short, to make the Windows partition bootable you need to repair the MBR on the Windows side. (I suspect an MDT deployment thinks its deploying to a normal PC and doesn't set it correctly for a macs GPT/MBR setup.) You do this using a small Microsoft exe program called BootRec.exe /FixMbr This file is located on the Windows DVD ISO inside the boot.wim in the resources folder. You will have to use imagex or GimageX to mount the boot.wim, navigate to the system32 folder and copy the bootrec.exe file.
This is a tool normally used by the Windows recovery environment to repair Windows installations that won't boot.
You can either put the bootrec.exe into a WinPE cd/dvd and test this manually or you can put it in your MDT "Tools" folder and call it as a "run command line" task in your MDT task sequence during the "Install" phase.
I have a 2008 iMac here, I've just put a Windows 7 MDT sysprepped image on it. Did the bcdboot.exe C:Windows command. Normally if you reboot at this point you'll get a black screen with a blinking cursor and the drive won't show up as available on the OSX boot option screen. Instead open a command prompt on your WinPE CD and type bootrec.exe /FixMbr
It should say, the command completed successfully. Restart the mac, hold down the option key and your Windows partition should now appear as a bootable drive.
As an additional note, I had an old MDT 2010 server where the bootrec command didn't seem to work but MDT has another program in its "Tools" folder called Bootsect.exe
The following command did fix the Windows 7 deployment on my old MDT 2010 server.
bootsect /nt60 C: /mbr
Again this was placed in the "Install" section of the task sequence.
@maxvre - I was never able to use MDT to reliably build any model of Macs that we have (iMacs, Mac Pros, MacBook Pros, you name it). The Macs would fail in varying steps, or run just fine (seemingly completely at the whim of the computer). Some would fail trying to format (using a custom format script I found online to format the disk0s4 partition), some would fail trying to reboot, or fail after reboot trying to connect to the task sequence. Even Microsoft wasn't able to help me (for $250). I ended up having to make a base Windows image with Winclone, and use Casper to deploy the package. Only then could I use MDT reliably to install the apps on the computers afterward.
The only way I can make MDT work reliably (-ish) on a Mac is when I basically make it an Apple PC (single boot Windows, no OS X), and let MDT completely format the drive and create its own structure (again, using a custom format script).
Unfortunately I'm stuck with MDT for the time being and I don't have Winclone. I've been running more tests tonight to try and figure out why my image is rebooting to a black screen with white cursor prompt. I have discovered that when deploying via an MDT boot CD on the 2008 imac models, WinPE always gives the MS-DOS partition a C: letter and the DVD drive a D: letter. But when deploying from a USB drive, WInPE seems to see it as another hard drive and can assign itself the letter C: or the Bootcamp partition a D: or E: letter etc. This causes my "Bootsect /nt60 C: /mbr" and "Bcdboot C:Windows" commands to fail in the task sequence without me knowing. Hence the black screen upon reboot. To fix it I've added C D E varients of these 2 commands and have ticked "continue on failure" in their options tabs. My MDT 2013 Win7 x86 deployment now seems to be working again on both the 2013 and 2008 models. I didn't restore the recovery partition via deploy studio. I'll test that tomorrow to see if it makes any difference. But for now my deployment is up and running again :)
@barret55 Sorry to exhume this post after so long, but I'm struggling with what I think is the same issue. We just got the new 2015 MacBook Airs in, and some of our users want to run Windows on them. We've been deploying successfully with MDT 2013 to Macs for Windows only (no OS X) setups up until now, but it seems as though these new Macs are EFI only, and do not support the legacy MBR partition scheme. I can just install Windows 8.1 pro through a USB installer just fine by wiping all the partitions and creating a new Windows partition, then installing, but no matter what I seem to do with MDT, I can't get them to recognize my deployment as bootable. The boot manager sees the resulting Windows partition as a bootable one, but as soon as I select it and hit restart, it complains that it wasn't able to set the partition as a bootable volume.
You mentioned in your last post that you used a custom format script to accomplish this (reliably-ish) using a custom format script. Would you mind sharing that, or at least explaining what it does, please?
@william_rogan This was the bane of my existence last summer. I never could get things to work on an EFI-only machine. I was able to get things to work on the older Macs that still could use legacy BIOS, and it worked very well to create Apple-branded PCs. For the EFI machines, I had to take one as a master, install Windows on it, sysprep it, and then used Winclone to make a .pkg out of it, which Casper could then use to deploy it to the other EFI Macs, like any other package. Definitely worth the money.
For the Apple-branded PC, I just created an extra task in the sequence, between the "Validate" and "Format and Partition Disk" steps called "Clean Mac Disk" (you can call it whatever you want). In the command line box, I have:
diskpart.exe /s "%scriptroot%<name of your .txt file>"
On the deployment share, in the "Scripts" folder, I created a simple .txt file with the following:
SELECT disk 0
This was enough to let MDT properly format the drive and install Windows. I was never able to get it to work reliably using a Bootcamp partition, so I scrapped the idea altogether, as I was running out of time.
Did this help any, or did I completely miss what you were asking?
@barret55 Not to Bootcamp, which I think you said you were struggling with. I just turned the new EFI-only MacBook Air into a Windows only MBA. We have a few users on campus who like turning the MacBook Airs into Windows only machines. We also try to steer people away from doing dual-boot. Although, our labs use deploystudio for dual boot, bootcamp scenarios. I think they nixed dual-boot for the EFI-only Mac Pros, however, as they just don't have enough hard drive space.
I would think you should be able to use MDT for Bootcamp deployments by getting rid of the Format and Partition part of the task sequence. You'd deploy the Mac partition first, run the Bootcamp assistant to partition, then run MDT and use a DISKPART script to do the formatting.
I had seen this one suggested at one point:
SELECT DISK 0
SELECT PARTITION 4
FORMAT FS=NTFS LABEL="BOOTCAMP" QUICK
You'd then have to set the Install Operating System task to apply the operating system to the variable BOOTCAMP.
Might be worth a shot!