To troubleshoot an issue with Windows 10 (especially boot-related issues), it can be handy to boot to Windows 10 that is not installed on a Boot Camp partition. It is relatively straightforward to create a bootable USB Flash drive to boot to the Windows 10 installer, and then open up a DOS prompt for troubleshooting.
What is needed
- USB Flash drive (8 GB or larger recommended)
- Windows 10 Installer ISO for Windows 10
All the preparation is done in macOS on the Mac that is having an issue booting Windows. It is important to use this Mac since it will be used to identify the correct Windows drivers.
USB Flash Drive
The USB Flash drive must be formatted as exFAT.
- Insert an 8GB or larger flash drive into a USB port on the Mac
- In Disk Utility, format the Flash drive as exFAT. Quit Disk Utility after this operation completes.
Boot Camp Driver
Open Boot Camp Assistant in the Utilities folder, and download the current Windows Support Software from the Action menu. Save the Windows Support Software to your desktop or other location, but do not save directly to the USB Flash Drive.
Windows Install Media
Download the current install media from the Microsoft website. Windows is not going to be installed, but the install media will give access to the command line tools in Windows. Select the version of Windows that is closes to the version of Windows installed on the Mac (Windows 8, Windows 10). It does not matter what edition of Windows is used since Windows is not going to be installed.
Create Recovery USB Flash Drive
To create the USB Flash drive, follow these steps:
- Mount the Windows ISO that was downloaded from Microsoft. To mount the ISO, double click on the ISO in the Finder.
- Drag all the files and folders from the mounted ISO to the USB Flash Drive.
- Drag the contents of the Windows Support Software to the USB Flash Drive.
- If there is not an AutoUnattend.xml at the top level of the drive (as shown below), download AutoUnattend.xml, unzip it, and add it to the drive. AutoUnattend.xml provides the location of the $WinPEDriver$ folder to load the drivers during boot.
- The 2018 MacBook Air (and potentially Macs after that) have cannot load the IntelMEI driver and give a “Windows Setup could not install one or more boot-critical drivers. To install Windows, make sure that the drivers are valid, and restart the installation”. On the USB Flash drive, open the $WinPEDriver$ and remove the IntelMEI folder.
Once the Flash drive has been created, it should look like this:
The $WinPEDriver$ folder is important because the $WinPEDriver$ folder contains the drivers for Windows to boot successfully from the USB Flash drive and the hardware on that Mac.
Boot from the USB Flash drive
To inject the drivers, the Mac must be booted from the USB Flash drive.
- Insert the USB Flash drive into an available USB port on the Mac
- Reboot while holding the option key.
- Select EFI volume in the startup selector.
If Windows does not boot from the USB Flash drive after showing the Windows logo, you may have to run the following command to tell the firmware to boot the windows installer from the USB flash drive. This has been observed on the late-2014 Mac Mini but may affect other models as well. To set the variable:
- Disable SIP by booting to the recovery partition.
- Boot back to macOS and open Terminal. Run the follow command and enter the admin password when prompted:
sudo nvram InstallWindowsUEFI=1
Insert the USB flash drive if it is not inserted, reboot, and select the EFI volume from the startup selector.
Note the InstallWindowsUEFI variable is cleared at each reboot, so you will to set it again if you do not select the USB Flash Drive.
Command Prompt and Mapped Drives
When Windows 10 starts up, it will prompt for installation of Windows 10. To open up a DOS window, press Fn-Shift-F10 (or just shift-F10) or click Repair Computer->Troubleshoot->Command Prompt (if available).
Once in the command prompt, there are usually 3 drive letters available: X, C, and D.
- X: This is Windows that you are booted into in memory. The files from the boot.wim on the flash drive are copied to memory and then booted to.
- C: Boot Camp partition
- D: The USB Flash drive
Within the Windows command prompt, you can run utilities on the Boot Camp partition.