Saturday, December 30, 2017

Create a Windows 10 USB Bootable Media when install.wim > 4GB

Generally it's fairly easy to create a USB bootable media for installing Windows 10. You can use Rufus; or Microsoft Media Creation Tool to make such bootable media to install Windows 10 under either UEFI/Secure Boot or legacy BIOS systems. 

Considering UEFI is going main stream after 2012 when Windows 8 was introduced, FAT32 is the file system of choice for the USB bootable media since UEFI Secure Boot only supports FAT32 as boot media. As a result, the max file size is limited to 4GB. With the release of Windows 10 Version 1709 (Updated December 2017; e.g., en_windows_10_multi-edition_vl_version_1709_updated_dec_2017_x64_dvd_100406172.iso), the size of install.wim is ~4.05GB. It can be expected that Microsoft will release more such ISOs with >4GB install.wim, which exceeds the FAT32 file size limit and cannot be copied onto the USB boot media.

Rufus does offer a UEFI:NTFS feature that enables UEFI boot support when the USB boot media is formatted with NTFS. However, Secure Boot has to be turned off (even temporarily) in order for this feature to work. While it is possible to turn off Secure Boot on some Motherboard, it's simply not feasible on most newer systems. What now?

The best and future proof way to get around this file size limit problem on a UEFI/Secure Boot system is to split the install.wim file to several .swm files, so that the size of each .swm file is <4GB. Then you copy all these split.swm files to the same directory to replace install.wim file. Windows 10 offers a simple way to accomplish this task:

1.  On a Windows 10 computer, run cmd as administrator;

2. Mount the Windows 10 ISO. Copy F:\sources\install.wim to C:\images\install.wim and run the command below:
Dism /Split-Image /ImageFile:C:\images\install.wim /SWMFile:C:\images\install.swm /FileSize:4000

where:
  • C:\images\install.wim is the name and the location of the image file that you want to split.
  • C:\images\install.swm is the destination name and the location for the split .swm files.
  • 4000 is the maximum size in MB for each of the split .swm files to be created.
In this example, the /split option creates an install.swm file, an install2.swm file, an install3.swm file, and so on, in the C:\images directory.

3. Format a UFD with FAT32 file system and mark it as Active; copy all files from the mounted Windows 10 ISO to the UFD. You'll see an error message popping up:



4. Click "Skip", let the copy operation finish the rest of the files. Then manually copy all the split install.swm files located in C:\images to X:\sources\ where X: is the drive letter of your UFD.

5. Boot the Windows 10 bootable media and start the fresh install. That's it.

P.S., it may also work if you convert install.wim to install.esd to compress the file and reduce the size. However the install.esd may still be >4GB. In this sense, the wim split method above is better and should work with install.wim of any size.

No comments:

Post a Comment