[Solution] Imaging Macs to Windows with MDT/WDS using Jamf

psd_martinb
New Contributor III

Hello everybody,

I have this working for the most part and wanted to share. Previously we were using Fog to install Windows on all PC/Mac hardware, needing flash drives for Mac hardware. Using captured images was more and more work as Windows 10 "upgrades" required fresh installations for sysprep, more time spent setting up an image than actually deploying it. Plus needed to be done every few months as major upgrades were released. (IE, 1511 -> 1607 -> 1703)

After a recent Microsoft certified Windows 10 deployment training, it looked as if Microsoft wasn't moving away from MDT/WDS anytime soon. MDT allows the deployment of Windows by simply taking the .wim file from a iso release, no sysprep needed! (as long as MDT configurations were set properly). For our needs we just want a base Windows 10 image with all customization coming from Group Policy.

After generating an iso for litetouch, I needed to boot it from our Macs. Unable to netboot to a Windows volume I had this idea.

  1. Netboot to JAMF
  2. Create 3 partitions, Recovery, Windows OS, Litetouch.
  3. Copy Litetouch iso to third partition.
  4. Boot to litetouch for Windows OS install.
  5. Winning, hand Windows device to user.

I tinkered with Winclone, bought the $40 version, then quickly realized I needed the ridiculously expensive version to work with JAMF. No thanks, public school districts should be conservative.

I resorted to creating a script. Very rough at the moment but seems to work without major issues. Very seamless experience for building techs, essentially one touch imaging, though it takes about an hour until Windows is ready. (Litetouch takes forever, fair trade off from imaging to fresh clean install every time)

#!/bin/bash

DISK="disk0"

#Create partitions manually as Casper had issues.
diskutil partitionDisk /dev/$DISK MBR "FAT32" "REC" "2G" "FAT32" "WINDOWS" "99%" "FAT32" "LITETOUCH" "2G"

#Get litetouch partition
LITE=$(diskutil list | grep "LITETOUCH" | awk '{print $6}')

#Mount litetouch (converted to dmg for sanity)
hdiutil attach /Volumes/JAMF/Packages/Win1607.dmg | awk '{print $1}'

#copy to partition
rsync -rav /Volumes/DVD_ROM/ /Volumes/LITETOUCH/

#diskutil unmountDisk /dev/$DISK

#dd wasn't working well, couldn't boot, partition then wasn't readable by macOS.
#sudo dd if=/Volumes/JAMF/Packages/DeploymentImaging.iso of=/dev/$LITE bs=131072

#Make bootable
sudo fdisk -y -u /dev/disk0s1

Place this script in the jss, then create a configuration in Casper Admin with only this script. With a priority of "After".
b2b7c84d66e34321bf02183f2418ad91

To create the dmg from iso, simply mount the iso from the MDT deploymentshare on a mac (double click in Finder), open Disk Utility, right click and press "Image from "DVD_ROM". Upload the dmg to the JSS using Casper Admin. Realistically this may only need to be done once, or whenever there is a significant change to MDT. (As task sequences can change without changing Litetouch?)
b1462d06158e489d9f794d3682d7d80f

References:
https://scriptimus.wordpress.com/2011/06/07/mdt-2010-fully-automated-lite-touch-deployment/
https://scriptimus.wordpress.com/2013/02/18/lti-deployments-skipping-deployment-wizard-panes/
https://scriptimus.wordpress.com/2011/05/26/mdt-2010-automating-task-sequence-selection/

[Edit: Typos]

0 REPLIES 0