Definitely made some progress. At PSU MacAdmins conference last week, I had some good discussions about PXE booting Macs. I did some further digging and testing, and there appear to be a bunch of options:
- Create a partition on the Mac and directly boot a WIM file that has WinPE on it.
- Create a netboot set that has a EFI bootloader than support PXE booting. You select a standard netboot image that has a iPxe bootloader swapped for the standard Mac bootloader. The Mac then starts up via the iPxe bootloader, and discovers the PXE boot server, loads the WinPE environment, and starts up from there.
- Create a Mac partition that has the Mac boot loader (normally in /System/Library/CoreServices/boot.efi) swapped out with the iPXE EFI bootloader.
I came up with #3 because it was faster to get into the PXE environment. After booting in to the PXE environment, I was able to boot WinPE from files located on Amazon S3. Here is what I did:
- In Windows, downloaded and installed Windows Assessment and Deployment Toolkit. Instructions here were very helpful:
http://ipxe.org/howto/winpe
- Created the WinPE files:
mkdir C:\temp\winpe
copype x86 C:\temp\winpe\x86
copype amd64 C:\temp\winpe\amd64
(turns out I didn’t use the x86 files).
-
Copied those files to an Amazon S3 bucket (since it was an easily available web server).
-
Create an EFI boot file. I had some trouble with dependencies when compiling both on the Mac and on Linux, so I got some success with https://rom-o-matic.eu. However, for testing, I just grabbed the EFI bootoader at https://netboot.xyz:
https://boot.netboot.xyz/ipxe/netboot.xyz.efi
-
To get the Mac to boot from this, I created a new partition and formatted it as HFS+. I copied a system folder over, and replaced the boot.efi file with the netboot.xyz.efi file (and renamed it boot.efi). I did some experimentation and discovered for it to be recognized as a startup disk, I needed these files:
.
└── System
└── Library
├── CoreServices
│ ├── SystemVersion.plist
│ └── boot.efi
└── Kernels
└── kernel
-
I rebooted the Mac and it didn’t work :). However, it was due to the USB ethernet dongle I was using on my Mac not being recognized. I found that if I plugged it in before it started probing the network for an IP address, the USB dongle worked fine.
-
I was then presented with a menu and selected the Windows option. You define a base url (which was the URL to the bucket) and then it prints out the URLs to these files:
bcd
boot.sdi
boot.wim
based on the base URL. I had to move things around a bit, and change the case of BCD and boot.wim to match, but after that, I was able to boot Windows. Windows PE booted and I was dropped into a Windows PE command prompt.
A couple of interesting notes:
I had concern when booting off the disk directly with WinPE that the partition could not be erased. However, using this method, the only file on disk that is used is the boot loader (boot.efi), and all the others files needed are off a webserver. I strongly strongly suspected that I could erase the partition that had the boot.efi, but don’t have a Windows imaging environment to test. I did, however, test with Linux. I did a similar procedure and booted into linux, and was able to format the partition I was booted off of.
The next step is to install Windows from the WinPE environment, or perhaps set up (or visit a site) with SCCM to try imaging the partition.
There is a couple of ways that Winclone could help set this up:
-
Winclone could prompt for the URL for a host WinPE environment, and then produce a package that would install a iPXE boot loader file on a new partition. The boot loader file would have the URL built in. Once you select it to boot, you select the same partition to restore and then Windows is installed. There may have to be some post fixing to make sure it boots. i’ll know more once I image the partition.
-
This could be done without installing anything on the client. Winclone could host a netboot set that had the iPXE boot loader and a DHCP server for the attributes to discover the URL get to to WinPE (or it could be hardcode in the boot loader). Macs on the same subnet would netboot, and when the load the Winclone netboot bootloader, it would boot into the iPXE environment and then chainload the WinPE environment from the URL.
-
Winclone could use the ISO created by Windows Assessment and Deployment Toolkit and install it on a partition. We tested doing this a bunch, but there was difficulty getting the BCD correct for a RAM disk boot version of Windows.
I was initially excited about #3, but #1 or #2 would mean that the boot loader would rarely need to be updated. I am going to investigate further. Let me know if you have any input on how this would work in your environment.