Freigeben über


Creating bootable USB drive for UEFI computers

In today’s blog I am going to discuss how to handle booting from a USB drive on a UEFI system so you can deploy Windows. It is common to create bootable USB flash drives or hard drives so you can boot from them to do various tasks such as

  • Boot Windows PE (WINPE) for recovery purposes
  • Boot Windows PE (WINPE) to deploy image
  • Boot Microsoft Deployment Toolkit media deployment share

For example if you are manually deploying Windows you are using a process similar to Basic Windows Deployment Step-by-Step Guide

UEFI based systems such as the Surface Pro or other UEFI systems require that the boot files reside on FAT32 partition. If they are not FAT32 the system may not see the device as bootable.

FAT32 has a 4GB individual file size limitation and 32GB maximum volume size. If any of the files are larger than 4GB you may have to configure the drive differently. Consider if you are booting Windows PE 4.0 and want to deploy a custom image using Dism.exe where the size of the image is 8GB. You would not be able to store the image on the FAT32 partition.

There are 2 options to work around this

Option #1: Utilize split images

Dism supports the /split-image command which would allow you to split the image into pieces that are less than 4GB.

Dism /Split-Image /ImageFile:install.wim /SWMFile:install.swm /FileSize:4000

This will create the following files (depending on size)

  • install.swm
  • install1.swm
  • install2.swm

Place all the files in a directory and use DISM /apply image

Dism /apply-image /imagefile:install.swm /swmfile:install*.swm /index:1 /applydir:D:

Option #2: Create multiple partition USB drive

Most flash drives report themselves as removable but to create multiple partitions on a USB drive the drive must report itself as Fixed. If you have access to a Windows to Go (WTG) certified drive you can use it since a requirement for WTG is that the device report as fixed. Some USB hard drives like the Western Digital Passport report themselves as fixed also.

To verify if the drive is reporting itself as fixed or removable plug the drive in and open My Computer:

  • Drive shows up under “Hard Disk drives”: Fixed
  • Drive shows up under “Devices with removable Storage”: Removable

To create a USB drive with multiple partitions use the following steps

1. Open elevated cmd prompt

2. Type in Diskpart and hit enter

3. Type in the following commands:

List disk

Sel disk X: (where X: is your USB drive)

Clean

Create Part Primary size=2048

Assign

Active

Format fs=fat32 quick Label=”Boot”

Create part primary

Assign

Format fs=ntfs quick Label=”Deploy”

Exit

Note: You can choose different sizes and volume labels depending on your needs

At this point you can now copy your boot files to the FAT32 partition and your other files(that are larger than 4GB) to the NTFS partition.

In the earlier example you would copy the contents of your custom Windows PE (WINPE) 4.0 files in C:winpe_amd64media to the FAT32 partition and your custom install.wim to the NTFS partition

Hope this helps with your deployments

<

p class="MsoNormal" style="margin: 0in 0in 8pt; line-height: 12pt; list-style-type: disc;">
Scott McArthur
Senior Support Escalation Engineer
Microsoft Customer Support and Services

Comments

  • Anonymous
    January 01, 2003
    Jeff,The problem (as is the case with other tablets) is that there is only one USB port. I came across this information, which may help others as well: support.microsoft.com/.../2845990As of yet I've been unsuccessful in deploying to a tablet, but will update this comment after trying the above. Looks like I'll have to use the "Media" portion of MDT and purchase a WTG drive.
  • Anonymous
    January 01, 2003
    Option #3: Use Rufus (http://rufus.akeo.ie) and its UEFI:NTFS mode, which provides seamless boot for NTFS partitions on UEFI systems, and thus allows >4GB install.wim

    If you are working with a Windows installation ISO, you can just select it in Rufus, set the partition scheme to GPT partition scheme for UEFI computers and set the file system to NTFS. Then the application should automatically make that NTFS partition UEFI bootable.

    If you're not working with a ISO, then you can also create a "blank" NTFS bootable UEFI drive by running Rufus in advanced mode (which is enabled by clicking the while triangle, near Format Options) and then selecting UEFI:NTFS as the boot option. Once the drive has been created, you can copy your Windows installation files (which should contain an /efi/boot/bootx64.efi or /efi/boot/bootia32.efi) on the NTFS partition, and that partition will boot.

    The way it works is by adding a small (256KB) FAT partition at the end of the drive, which contains an EFI boot executable that loads a Free Software (GPLv3) NTFS EFI driver. Once the relevant driver is loaded, that executable locates the regular EFI bootloader, on the NTFS partition, and hands the boot over to it.

    The one drawback this method has is that, since the EFI boot executable on the FAT partition is not signed by Microsoft (which I don't think it can be, on account of the the Microsoft Secure Boot signing process explicitly the use of GPLv3 as a license), it is not compatible with Secure Boot. But this will only matter for the initial boot, and Secure Boot can be re-enabled after the initial install phase.

    For more on this see the UEFI:NTFS project (https://github.com/pbatard/uefi-ntfs).

    [Disclaimer: I am the author of Rufus and UEFI:NTFS]
  • Anonymous
    January 01, 2003
    The comment has been removed
  • Anonymous
    January 01, 2003
    Hello Scott,Could you use two usb hard drives? One that is formatted with FAT32, WinPE 4 and size < 4 GB. Boot the computer with it. Then have a thick image ( custom install .wim)  copied to the 2nd usb hard drive. If this could work, it solve the problem deploying to wireless laptops that are not hard wiredly connected to the network.thanks for your help,Jeff Jensen
  • Anonymous
    January 01, 2003
    The comment has been removed
  • Anonymous
    June 07, 2013
    Hi,I would like to clarify on the following statements.In the earlier example you would copy the contents of your custom Windows PE (WINPE) 4.0 files in C:winpe_amd64media to the FAT32 partition and your custom install.wim to the NTFS partitionWhen we created a MDT media it will contains the followings files and folder, can I know in details what files and folder should go to Boot partition and which should go to deploy partition?Folder:BootDeployEFIFiles:-bootmgrbootmgr.efi
  • Anonymous
    January 26, 2014
    ISO2Disc is a freeware which allows to create a GPT bootable USB drive from WinPE ISO image:http://www.top-password.com/iso2disc.html
  • Anonymous
    March 27, 2014
    Hi,

    tried the above method on a fresh 32GB USB key after creating a 500MB primary partition i try creating the second one and get this error:

    No usable free extent could be found. It may be that there is insufficient
    free space to create a partition at the specified size and offset. Specify
    different size and offset values or don't specify either to create the
    maximum sized partition. It may be that the disk is partitioned using the MBR disk
    partitioning format and the disk contains either 4 primary partitions, (no
    more partitions may be created), or 3 primary partitions and one extended
    partition, (only logical drives may be created).
  • Anonymous
    April 11, 2014
    Looking to boost your brand awareness? Build effective brand loyalty or stay top of mind with Studio D Promotional Merchandise Agency in Los Angeles. Order for your custom made, logo merchandise today! Log on http://studiodmerchandise.com/
  • Anonymous
    April 16, 2014
    The comment has been removed
  • Anonymous
    April 29, 2014
    Most of time bookable devices do gives problems with fat 32 , but not with NTFS as most of OS which are now available in market do have NTFS so NTFS suits us a lot specially with usb drives on http://www.promotionaldrives.com
  • Anonymous
    June 05, 2014
    Is there a way to do this with the MDT2012 media creation process, and point it to the "Deploy" partition instead of the usual MDT network deploy share?
  • Anonymous
    July 22, 2014
    The comment has been removed
  • Anonymous
    September 10, 2014
    The comment has been removed
  • Anonymous
    November 01, 2014
    FAT32 does not have a 4GigaByte(4,000,000,000 bytes) file size limit which is 1000 based.

    Fat32 has a 4GiB(4,294,967,295 bytes) files size limit or approx. 4.3 Gibibytes which is 1024 based.
    4GiB is 2 to 32nd power. = 4,294,967,295+1 cause 0 is place holder in binary..
  • Anonymous
    December 05, 2014
    Initializing is pretty quick to do. USB devices ( http://www.spectra.com/ ) comes handy and mostly devices with USB ports are plug and play.
  • Anonymous
    December 14, 2014
    Thank you ever so for you article post. Really Great.
  • Anonymous
    December 29, 2014
    Hello Jeff Hughes, thank you for the brilliant article. It offered a simple solution. However, when splitting Windows 8 and 8.1 images, users will ultimately run into a "Windows cannot find the Microsoft Software License Terms. Make sure the installation sources are valid and restart the installation" error. Before that, it will not accept any given product key. Unattended setups that are set to accept the eula error out too.

    This TechNet article details that Windows 8/8.1 does NOT support splitting of WIM files:http://technet.microsoft.com/en-us/library/hh825096.aspx and suggests to use the /Apply-Image option in the DISM tool and working off of multiple DVD's, which is not suitable for my purpose (FAT32 formatted, UEFI compatible stick with one partition, large customized windows 8.1 WIM).

    Since i am not versatile enough with DISM and the whole deployment story, and probably many others too, wouldn't it be a good idea to come up with an article that offers a precise solution for exactly this dilemma? UEFI, FAT32 requirement, large install.wim's...

  • Anonymous
    January 16, 2015
    The comment has been removed
  • Anonymous
    March 16, 2015
    My Surface seems to only see the NTFS drive. I have performed bootsect on the boot partition, but with both partitions on there I get a Windows Boot Manager error. "A required device isn't connected or can't be accessed" is there something I need to do to force it to only look at the FAT32 partition and ignore the NTFS for booting?
  • Anonymous
    April 27, 2015
    Thanks Akeo your program works great :)
    • Anonymous
      February 26, 2016
      On GTP no size, volume no, or any limitation, what u mentioning it is laptop. Like uefi won't ever boot into ntf or ext2-3-4 on surface, tried several time, as it has no legacy bios interface it will do nothing just an error message, sick but there it is. UEFI bios normally need GTP partition, first partition fat 32 eg 1gb or 512 mb , where the bootloader, pre-os system found. Even I have tried to get a working Linux on my PC because of UEFI .... I could not manage a proper Linux with standard installers, as they use that trick that computers normally has bios and mbr support, so can boot from ext3 ntf etc. The most funny thing u can have a full ntfs / ext etc disk and use usb to boot into that maybe :) From my point of view UEFI not rly awesome and not so practical like legacy systems but at least standard.... And I still don't know how a GRUB loader would run on fat 32... surface would be better with at least some legacy support.
  • Anonymous
    July 15, 2016
    Thank you so much for giving everyone such a superb opportunity to read in detail from here. It is often very pleasant and as well , packed with a great time for me and my office mates to search your website at a minimum 3 times weekly to read through the newest guidance you have got. And of course, I am also certainly satisfied with the good thoughts you give. Certain 3 ideas in this article are rather the most beneficial we have had.
  • Anonymous
    January 23, 2017
    HI Jeff, I use USB External 500 GB W.D formatted with NTFS Partition , I have image sizes varying from 6 to 8 GB, I use my external HDD to install the images, copy extracted ISO images to install . Now I have created image for Surface Pro-4 which supports only UEFI boot with FAT32 partition, how can I use one USB HDD with two partition supporting UEFI and NTFS Image installation at same time. I mean how can get the boot menu from HDD to install which image. can you kinfly help me
  • Anonymous
    August 08, 2017
    The comment has been removed
    • Anonymous
      September 26, 2017
      When clicking on that link it says the content is not published.
  • Anonymous
    September 26, 2017
    Jeff, I'm confused about Option 1. It sounds great, but do we have to do the second step?Place all the files in a directory and use DISM /apply imageDism /apply-image /imagefile:install.swm /swmfile:install*.swm /index:1 /applydir:D:For example, Server 2016 has a 4.7GB WIM file and I need to create a UEFI bootable install USB key. If I do the first step and instead of the large WIM file have the split SWM files in the same folder will the installer work? Seems the second step combines them again which defeats the purpose of a bootable, install USB key. Going to try it out.