Sunday, January 6, 2019

Installing Windows from a USB Flash Drive

By Steve Endow


UPDATE:  Ian Grieve informed me that there is a Microsoft tool that will help you create a bootable USB drive from an ISO image.  

Here is his article about the "Windows USB/DVD Download Tool":

http://www.azurecurve.co.uk/2013/01/how-to-make-a-bootable-windows-8-usb-drive/


Here is the current Microsoft link to download the tool (as of Jan 2019):

https://www.microsoft.com/en-us/download/details.aspx?id=56485



I'm currently building a new dedicated Windows server for running Dynamics 365 Business Central Docker images.


Since I only build a new machine every 2-3 years, I always have to lookup how to setup a bootable USB flash drive with the Windows installation files.

I am confident that I will forget this information in 2 weeks, so I'm posting this for posterity.


Here are the two articles that I used.

I initially tried to use Windows Disk Manager, but it didn't allow me to set the USB partition to "Active".  So I had to use the steps from this first article to set the active partition.


Prepare the USB drive using DiskPart:

https://docs.microsoft.com/en-us/windows-server-essentials/install/create-a-bootable-usb-flash-drive


Insert USB flash drive
Administrator Command Prompt
diskpart
list disk
select disk <#>         (make sure to select the correct disk for your USB drive!!!!)
clean
create part pri
select part 1
format fs=fat32 quick
active
exit


And because Windows ISO images now have files larger than 4GB, you can't copy them to FAT32 file systems.  So I had to use the commands from this article to copy the Windows installation files to the USB drive.

After mounting the Windows ISO file so that it shows up as a new drive letter, run the two commands listed at the bottom of the article.  Make sure to set the drive letters to match your source and destination drive letters.


Copy the files to the USB drive using Robocopy and DISM: (commands at bottom)

https://docs.microsoft.com/en-us/windows-hardware/manufacture/desktop/install-windows-from-a-usb-flash-drive


robocopy D: E: /s /max:3800000000

Dism /Split-Image /ImageFile:D:\sources\install.wim /SWMFile:E:\sources\install.swm /FileSize:3800



Steve Endow is a Microsoft MVP in Los Angeles.  He is the owner of Precipio Services, which provides Dynamics GP integrations, customizations, and automation solutions.

You can also find him on Twitter and YouTube





No comments:

Post a Comment

All comments must be reviewed and approved before being published. Your comment will not appear immediately.

C# and SQL and Dynamics GP: Sending a List to a Stored Procedure

By Steve Endow This is a discussion of how to send a list of values to a SQL stored procedure parameter. Specifically, how can a .NET ap...