Creating a Windows 10 boot USB for UEFI used to be pretty easy. Things have changed with the October 2018 Windows 10 1809 update. Luckily it’s still pretty easy, but it’s a bit more involved than creating a Ubuntu UEFI boot USB.

Table of Contents

Before you begin there are a few things you’re going to need:

  • USB drive you don’t mind erasing (8GB in size or greater)
  • Windows 10 ISO file (can be downloaded from Microsoft here)
  • 7-zip installed

The Problem

It was possible to create a bootable UEFI USB for Windows 10 versions prior to the October 2018 Windows 10 1809 update fairly easily by following my previous tutorial creating a Ubuntu UEFI boot USB. That tutorial was for Ubuntu Linux but the process at the time was exactly the same for the Windows OS, you just needed to copy the files from a Windows ISO to the USB instead of the Ubuntu ISO.

The problem now is that the Install.wim file provided in the Windows 10 1809 ISO download from Microsoft is over 4 GB in size. We need to have our boot USB formatted as FAT32 in order to boot properly on all UEFI computers*, and FAT32 has a file size limit of 4GB. The install.wim file is now too large to copy to the FAT32 partition of the USB.

*Note it is possible to create a USB formatted as NTFS and have it boot, however this does not work on all computers. The only “universal” file system to use to ensure the USB will boot is FAT32.

To work around this, we can use a solution as described in this post from Win10.guru, which creates a USB with a bootable FAT32 partition for the Windows 10 boot files, and an NTFS partition for the install.wim file. The beautiful thing about this solution is that not only can you use it on the official Windows 10 1809 ISO file, but you can also use it if you make your own custom Windows 10 image with an install.wim file greater than 4GB in size.

Formatting the USB Drive

  1. Open a terminal window alt text

  2. Install gparted if not already installed

    $ sudo apt install gparted
    alt text

  3. Run gparted. Gparted will need admin rights so make sure you run with “sudo”

    $ sudo gparted 
    alt text

  4. Choose your USB drive from the dropdown in the upper right-hand corner alt text

  5. Make sure you have the correct device specified, then go to the “Device” menu and choose “Create Partition Table…” alt text

  6. Choose “gpt” from the partition table type dropdown alt text

    WARNING

    Clicking “Apply” on the following screen WILL delete ALL data on the selected partition. Ensure the correct drive/partition is chosen as choosing the wrong drive WILL DELETE ALL DATA on that drive. You have been warned.

  7. Again ensure that you have the correct device specified and then click Apply alt text

  8. Right-click the new unallocated space and choose New alt text

  9. This will be our FAT32 partition that we’ll boot from

    • 1GB in size will be plenty, so enter 1024 in the “New size (MiB)” field
    • From the “File system” dropdown choose fat32
    • Give it a descriptive label. I chose “UEFI_Boot”
    • Click Add when done alt text
  10. Right-click the unallocated space again and choose New alt text

  11. This time we’ll create a NTFS partition for the install.wim file (and other necessary files)

    • We’ll let it use the rest of the free space available on the drive, so you can leave the “New size (MiB)” field alone
    • From the “File system” dropdown choose NTFS
    • Give it a descriptive label. I chose “Win10”
    • Click Add when done alt text

      Note: You’ll likely have a small amount of unallocated space left over. In the case below it is 1MB in size. This is normal and perfectly fine.

  12. Ensure that the partitions look correct, and again, most importantly ensure that you’re using the correct device. If everything looks good click the green checkmark to apply the changes alt text

    WARNING

    Clicking “Apply” on the following screen WILL delete ALL data on the selected partition. Ensure the correct drive/partition is chosen as choosing the wrong drive WILL DELETE ALL DATA on that drive. You have been warned.

  13. Click Apply again on the warning confirmation in order to make the changes alt text

  14. A status screen will appear as gparted makes the necessary changes to the partition layout alt text

  15. When the changes have been completed, you can click Close on the dialog window and then close gparted alt text

  16. Next open a file explorer alt text

  17. You should see that you now have the two new partitions that you just created alt text

    If you don’t see the partitions unplug the USB drive, wait 5 seconds and plug it back in. The partitions should appear automatically in the device list on the side as above.

Creating the UEFI Bootable USB

Now that we have a freshly formatted USB drive, we can proceed to creating the UEFI bootable USB. In short, we’re going to:

  • Extract everything but the “sources” folder to the FAT32 partition
  • Extract the “sources/boot.wim” file to the FAT32 partition (needed in order to boot)
  • Extract the entire “sources” folder to the NTFS partition
  1. Open a terminal window alt text

  2. Before we copy the files to our USB stick using 7-zip (‘7z x’ command), let’s find the files we need to extract alt text

    • Change to the downloads folder where our Windows 10 ISO file is located

      $ cd ~/Downloads

    • View the files in the folder

      $ ls
      Win10_1809Oct_English_x64.iso

    • List the contents of the ISO file and search for boot.wim

      $ 7z l Win10_1809Oct_English_x64.iso | grep -i boot.wim
      2018-10-29 20:16:30 .....    400988824    400990208  sources/boot.wim

    • Add the “sources” folder to a text file containing a list of files to exclude

      $ echo "sources/" > exclude.txt

    • Add the boot.wim file to a text file containing a list of files to include

      $ echo "sources/boot.wim" > include.txt

    • Show the contents of the exclude.txt file

      $ cat exclude.txt
      sources/

    • Show the contents of the include.txt file

      $ cat include.txt
      sources/boot.wim

  3. Now we can build our 7-zip extract command

    Note: We’re creating two files above “exclude.txt” and “include.txt” because 7-zip is capable of excluding or including specific files to extract, but it will only take the input in the form of a file listing or a wildcard pattern

    # Extract the contents of the ISO file to the FAT32 partition using 7-zip, 
    # but exclude the "sources" file. 
    # Exclude using 7-zips exclude function: -x@filename.txt
    $ 7z x -x@exclude.txt Win10_1809Oct_English_x64.iso -o/media/blah/UEFI_Boot/
    alt text

  4. When that extraction finishes, we’re going to issue the same command again, but this time we want to extract only the boot.wim file to the UEFI_Boot partition.

    # List the contents of the UEFI_Boot partition
    # Notice that the "sources" folder does not exist
    $ ls /media/blah/UEFI_Boot/
    autorun.inf  boot  bootmgr  bootmgr.efi  efi  setup.exe  support
    
    # Extract only the files specified by the include file to UEFI_Boot
    # Include using 7-zips include function: -i@filename.txt
    $ 7z x -i@include.txt Win10_1809Oct_English_x64.iso -o/media/blah/UEFI_Boot/
    alt text

  5. After the boot.wim file is extracted we can see that it exists on the UEFI_Boot partition with the ls command

    $ ls /media/blah/UEFI_Boot/sources/
    boot.wim
    alt text

  6. That’s it for the FAT32 partition! Now we can extract the entire “sources” folder to the NTFS partition.

    # Extract the "sources" folder to the Win10 partition. Since we already
    # have a file containing this information (exclude.txt), we can use 
    # the include function with the existing "exclude.txt" file
    # Include using 7-zips include function: -i@filename.txt
    
    $ cat exclude.txt
    sources/
    $ 7z x -i@exclude.txt Win10_1809Oct_English_x64.iso -o/media/blah/Win10/
    alt text

  7. When finished you can list the contents of each partition

    $ ls /media/blah/UEFI_Boot/
    $ ls /media/blah/UEFI_Boot/sources/
    $ ls /media/blah/Win10/
    $ ls /media/blah/Win10/sources/
    alt text

  8. Click the “eject” symbol next to one of the partitions in the file explorer to safely remove the drive. Since this is USB, it might take a few minutes to eject with the message that data is still being written to the device. Wait for it to say you can safely remove and then pull out the USB alt text

  9. You should now be able to boot from this USB to install Windows 10!

If you have any questions/comments please leave them below.

Until Later ^‿^

If you enjoyed reading this article, please consider buying me a coffee. Buy Me a Coffee at ko-fi.com