Skip to content

Instantly share code, notes, and snippets.

@startergo
Last active November 24, 2022 07:23
Show Gist options
  • Save startergo/b4fefd4827cfbcb467ec6d3014f83c96 to your computer and use it in GitHub Desktop.
Save startergo/b4fefd4827cfbcb467ec6d3014f83c96 to your computer and use it in GitHub Desktop.
How to install Windows 10 to an external drive has be answered may times here at Ask Different. Most notably Is it possible to use Boot Camp with Windows 10 from an external HDD?. Enough subtle changes have been made to macOS and Windows 10, that I felt the answer should be reposted. Here, I try to incorporate the best ideas in all the other answers I have read. This answer does not require a virtual machine, optical (DVD) drive or any flash drives.
Note: When this answer was tested on a 2018 Mac mini with the T2 chip, Secure Boot and External Boot was set, as shown below. For instruction on how to configure a Mac with the T2 chip, see the Apple website About Secure Boot.
1 Download the latest Windows 10 ISO file from the Microsoft website Download Windows 10 Disc Image (ISO File). Currently this would be 1909 (September 2019) update.
2 Download Window Support Software. Open the Boot Camp Assistant application. From the menu bar, select Action->Download Windows Support Software. By Default, the files should download to WindowsSupport folder in your home folder. When the popup shown below appears, enter your password then click on the Unlock button.

When finished, quit the Boot Camp Assistant.
3 Plug in the external drive. Open the Disk Utility application. In the pulldown menu in the upper left corner of the Disk Utility application, make sure Hide Sidebar is not checked off and Show All Devices is check off, as shown below.

Highlight the external drive and select the Erase button. Enter the following in the popup window, then click on the Erase button.

When finished erasing, click on the Done button. With the external drive still highlighted, click on the Partition button. Make the following changes in the order given below.
Note: The size entered below has to be large enough to create a volume that can hold the Windows ISO and Window Support Software files. The value of 16 GB should provide more that enough space. However, a smaller value can be substituted.

• Click on the + button.
• Enter a size of 16 GB.
• Enter the name WINSTALL.
• Select the ExFAT format.
4  
The result should appear as shown below.

Click on the Apply, Partition, and Done buttons in the given order. When finished, quit the Disk Utility.
5 Using the Finder application, mount the Window 10 ISO file and copy the contents to the WINSTALL volume. Next copy the contents of the WindowsSupport folder to the WINSTALL volume. In your case, the result should appear as shown below.

6 Open a Terminal Application window and enter the following commands. These commands create labels that will eventually appear below the Mac Startup Manager external drive icons.
bless --folder /Volumes/WINSTALL/efi/boot --label "Install Windows"
7 mkdir /Volumes/WINSTALL/label
8 bless --folder /Volumes/WINSTALL/label --label "Windows"
9 
When finished, quit the Terminal application.
10 Restart the Mac and immediately hold down the option key until the Startup Manager icons appear. Boot from the external drive by selecting the external drive icon labeled Install Windows.
11 The first window to appear should be similar to the one shown below.

Proceed as one would for a GUI installation of Windows. When a window similar to the one shown below appears, press the shift+F10 key combination.

The result should be the appearance of the Command Prompt window shown below.

12 This is the step where commands are entered to install Windows 10 Pro. For this Windows 10 ISO, a complete list of names to choose from are given below.
Windows 10 Home
13 Windows 10 Home N
14 Windows 10 Home Single Language
15 Windows 10 Education
16 Windows 10 Education N
17 Windows 10 Pro
18 Windows 10 Pro N
19 Windows 10 Pro Education
20 Windows 10 Pro Education N
21 Windows 10 Pro for Workstations
22 Windows 10 Pro N for Workstations
23 
If you have a different Windows ISO, then a list of names can be generated by entering the command shown below after exiting the diskpart command.
dism /get-imageinfo /imagefile:t:\sources\install.wim
24 
Below are the commands to be entered.
Note: If more that one disk appears in the list of disks, then care must be taken to select the correct disk, otherwise important data could be lost.

diskpart
25 list disk
26 select disk 0
27 list partition
28 select partition 3
29 assign letter=t
30 select partition 2
31 delete partition
32 create partition msr size=16
33 create partition primary
34 format fs=ntfs label=BOOTCAMP quick
35 assign letter=w
36 select partition 1
37 assign letter=s
38 list volume
39 exit
40 dism /apply-image /imagefile:t:\sources\install.wim /name:"Windows 10 Pro" /applydir:w:\ /checkintegrity
41 dism /image:w:\ /add-driver /driver:t:\$WinPEDriver$ /recurse /forceunsigned
42 bcdboot w:\windows /l en-us /s s: /f uefi
43 attrib -h t:\label\*
44 copy t:\label\.d* s:\efi\boot
45 attrib +h s:\efi\boot\.d*
46 exit
47 
Below is an example of the typical output from entering the above commands.
Microsoft Windows [Version 10.0.18362.418]
48 (c) 2019 Microsoft Corporation. All rights reserved.
49
50 X:\Sources>diskpart
51
52 Microsoft DiskPart version 10.0.18362.1
53
54 Copyright (C) Microsoft Corporation.
55 On computer: MINWINPC
56
57 DISKPART> list disk
58
59 Disk ### Status Size Free Dyn Gpt
60 -------- ------------- ------- ------- --- ---
61 Disk 0 Online 465 GB 128 MB *
62 Disk 1 Online 233 GB 0 B *
63
64 DISKPART> select disk 0
65
66 Disk 0 is now the selected disk.
67
68 DISKPART> list partition
69
70 Partition ### Type Size Offset
71 ------------- ---------------- ------- -------
72 Partition 1 System 200 MB 20 KB
73 Partition 2 Primary 450 GB 201 MB
74 Partition 3 Primary 14 GB 450 GB
75
76 DISKPART> select partition 3
77
78 Partition 3 is now the selected partition.
79
80 DISKPART> assign letter=t
81
82 DiskPart successfully assigned the drive letter or mount point.
83
84 DISKPART> select partition 2
85
86 Partition 2 is now the selected partition.
87
88 DISKPART> delete partition
89
90 DiskPart successfully deleted the selected partition.
91
92 DISKPART> create partition msr size=16
93
94 DiskPart succeeded in creating the specified partition.
95
96 DISKPART> create partition primary
97
98 DiskPart succeeded in creating the specified partition.
99
100 DISKPART> format fs=ntfs label=BOOTCAMP quick
101
102 100 percent completed
103
104 DiskPart successfully formatted the volume.
105
106 DISKPART> assign letter=w
107
108 DiskPart successfully assigned the drive letter or mount point.
109
110 DISKPART> select partition 1
111
112 Partition 1 is now the selected partition.
113
114 DISKPART> assign letter=s
115
116 DiskPart successfully assigned the drive letter or mount point.
117
118 DISKPART> list volume
119
120 Volume ### Ltr Label Fs Type Size Status Info
121 ---------- --- ----------- ----- ---------- ------- --------- --------
122 Volume 0 W BOOTCAMP NTFS Partition 450 GB Healthy
123 Volume 1 T WINSTALL exFAT Partition 14 GB Healthy
124 * Volume 2 S EFI FAT32 Partition 200 MB Healthy Hidden
125 Volume 3 EFI FAT32 Partition 300 MB Healthy Hidden
126
127 DISKPART> exit
128
129 Leaving DiskPart...
130
131 X:\Sources>dism /apply-image /imagefile:t:\sources\install.wim /name:"Windows 10 Pro" /applydir:w:\ /checkintegrity
132
133 Deployment Image Servicing and Management tool
134 Version: 10.0.18362.1
135
136 Applying image
137 [==========================100.0%==========================]
138 The operation completed successfully.
139
140 X:\Sources>dism /image:w:\ /add-driver /driver:t:\$WinPEDriver$ /recurse /forceunsigned
141
142 Deployment Image Servicing and Management tool
143 Version: 10.0.18362.1
144
145 Image Version: 10.0.18363.418
146
147 Searching for driver packages to install...
148 There was a problem opening the INF file. t:\$WinPEDriver$\IntelHDGraphics64\autorun.inf Error: 0xE0000100.
149 Found 24 driver package(s) to install.
150 Installing 1 of 24 - t:\$WinPEDriver$\AppleAudio\AppleAudio.inf: The driver package was successfully installed.
151 Installing 2 of 24 - t:\$WinPEDriver$\AppleAudio_1884106B\AppleAudio_1884106B.inf: The driver package was successfully installed.
152 Installing 3 of 24 - t:\$WinPEDriver$\AppleBluetoothBroadcom64\AppleBTBC.inf: The driver package was successfully installed.
153 Installing 4 of 24 - t:\$WinPEDriver$\AppleMultiTouchTrackPad64\AppleMTP64.inf: The driver package was successfully installed.
154 Installing 5 of 24 - t:\$WinPEDriver$\AppleMultiTouchTrackPadPro64\AppleTPP64.inf: The driver package was successfully installed.
155 Installing 6 of 24 - t:\$WinPEDriver$\AppleSSD64\AppleSSD.inf: The driver package was successfully installed.
156 Installing 7 of 24 - t:\$WinPEDriver$\Aquantia64\aqnic650.inf: The driver package was successfully installed.
157 Installing 8 of 24 - t:\$WinPEDriver$\BroadcomBluetoothHID64\UheBtHid.inf: The driver package was successfully installed.
158 Installing 9 of 24 - t:\$WinPEDriver$\BroadcomBluetoothHID64\UheSerialBus.inf: The driver package was successfully installed.
159 Installing 10 of 24 - t:\$WinPEDriver$\BroadcomWirelessUDM64\bcmwdidhdpcie.inf: The driver package was successfully installed.
160 Installing 11 of 24 - t:\$WinPEDriver$\Dolby\swc_aposvc\dax3_swc_aposvc.inf: The driver package was successfully installed.
161 Installing 12 of 24 - t:\$WinPEDriver$\Dolby\swc_hsa\dax3_swc_hsa.inf: The driver package was successfully installed.
162 Installing 13 of 24 - t:\$WinPEDriver$\IntelHDGraphics64\Graphics\cui_comp.inf: The driver package was successfully installed.
163 Installing 14 of 24 - t:\$WinPEDriver$\IntelHDGraphics64\Graphics\iigd_base.inf: The driver package was successfully installed.
164 Installing 15 of 24 - t:\$WinPEDriver$\IntelHDGraphics64\Graphics\iigd_ext.inf: The driver package was successfully installed.
165 Installing 16 of 24 - t:\$WinPEDriver$\IntelHDGraphics64\Graphics\IntcDAud.inf: The driver package was successfully installed.
166 Installing 17 of 24 - t:\$WinPEDriver$\IntelHDGraphics64\Graphics\msdk_comp.inf: The driver package was successfully installed.
167 Installing 18 of 24 - t:\$WinPEDriver$\IntelHDGraphics64\Graphics\vk_comp.inf: The driver package was successfully installed.
168 Installing 19 of 24 - t:\$WinPEDriver$\IntelMEI\heci.inf: The driver package was successfully installed.
169 Installing 20 of 24 - t:\$WinPEDriver$\IntelSST\intcaudiobus.inf: The driver package was successfully installed.
170 Installing 21 of 24 - t:\$WinPEDriver$\SerialIO\iaLPSS2_GPIO2_CNL.inf: The driver package was successfully installed.
171 Installing 22 of 24 - t:\$WinPEDriver$\SerialIO\iaLPSS2_I2C_CNL.inf: The driver package was successfully installed.
172 Installing 23 of 24 - t:\$WinPEDriver$\SerialIO\iaLPSS2_SPI_CNL.inf: The driver package was successfully installed.
173 Installing 24 of 24 - t:\$WinPEDriver$\SerialIO\iaLPSS2_UART2_CNL.inf: The driver package was successfully installed.
174 The operation completed successfully.
175
176 X:\Sources>bcdboot w:\windows /l en-us /s s: /f uefi
177 Boot files successfully created.
178
179 X:\Sources>attrib -h t:\label\*
180
181 X:\Sources>copy t:\label\.d* s:\efi\boot
182 t:\label\.disk_label
183 t:\label\.disk_label_2x
184 2 file(s) copied.
185
186 X:\Sources>attrib +h s:\efi\boot\.d*
187
188 X:\Sources>exit
189
190 After the Command Prompt window closes, click on the red X. When the popup shown below appears, click on the Yes button.

When the next windows appears, click on the red X. When the popup shown below appears, click on the Yes button.
 When the Mac restarts, hold down the option key until the Mac boots to the Startup Manager. Next, hold down the control key while selecting the external drive icon labeled Windows.
191 After Windows 10 finishes installing, you will need to run the Boot Camp Support Software installer. This can be accomplished by opening the Setup application in the BootCamp folder on volume labeled WINSTALL.
Note: After the Boot Camp Support Software installer finished and the Mac restarted, the volume labeled WINSTALL was no longer assigned a drive letter. If you need to access this volume, then use Disk Management to assign the volume a drive letter. You can also protect the volume by using Disk Management to remove the drive letter.

192 While booted to Windows, run Apple Software Update to check for any new software from Apple.
Optional: Removing the Installation Partition
The instructions below remove the partition containing the Windows 10 ISO and Windows Support Software files. The free space is then added to the Windows partition.
Note: There exists a Golden Rule which can be loosely stated as “Never use Windows software to change the partitioning on Mac computers.” An exception to this rule is when Windows UEFI boots from the Windows installation files or the Windows Recovery Environment (Windows RE). Seeing a drive letter of X: is an indicator that this has occurred. Since the external drive contains no Apple partitions, you may want to chance using the Disk Management system utility in Windows, instead of following the instructions given below.
Boot to the Windows Recovery Environment (Windows RE). Basically, hold down the shift key while while selecting Restart, as shown in the image below.
Next, a series of menus will appear. Select Troubleshoot, Advanced options and Command Prompt in the order given. Eventually, a Command Prompt window will appear.
Below are the commands to be entered.
Note: If more that one disk appears in the list of disks, then care must be taken to select the correct disk, otherwise important data could be lost.
diskpart
list disk
select disk 1
list partition
select partition 4
delete partition
select partition 3
extend
list partition
exit
exit
Below is an example of the typical output from entering the above commands.
Microsoft Windows [Version 10.0.18362.418]
(c) 2019 Microsoft Corporation. All rights reserved.
X:\windows\system32>diskpart
Microsoft DiskPart version 10.0.18362.1
Copyright (C) Microsoft Corporation.
On computer: MININT-G6386F5
DISKPART> list disk
Disk ### Status Size Free Dyn Gpt
-------- ------------- ------- ------- --- ---
Disk 0 Online 233 GB 0 B *
Disk 1 Online 465 GB 128 MB *
DISKPART> sel disk 1
Disk 1 is now the selected disk.
DISKPART> list part
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 200 MB 20 KB
Partition 2 Reserved 16 MB 201 MB
Partition 3 Primary 450 GB 217 MB
Partition 4 Primary 14 GB 450 GB
DISKPART> select partition 4
Partition 4 is now the selected partition.
DISKPART> delete partition
DiskPart successfully deleted the selected partition.
DISKPART> select partition 3
Partition 3 is now the selected partition.
DISKPART> extend
DiskPart successfully extended the volume.
DISKPART> list partition
Partition ### Type Size Offset
------------- ---------------- ------- -------
Partition 1 System 200 MB 20 KB
Partition 2 Reserved 16 MB 201 MB
* Partition 3 Primary 465 GB 217 MB
DISKPART> exit
Leaving DiskPart...
X:\windows\system32>exit
After the Command Prompt Windows closes, the menu shown below will appear. Select Turn off your PC.
“To Do List” of Items Not Covered in This Answer
• Add a custom icon to the Startup Menu
• Move the Windows Recovery Environment (Windows RE) files to their own partition.
• Configure Windows to use the Apple keyboard.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment