Creating bootable USB drive for UEFI computers

Creating bootable USB drive for UEFI computers

  • Comments 10
  • Likes

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_amd64\media to the FAT32 partition and your custom install.wim to the NTFS partition

Hope this helps with your deployments


Scott McArthur
Senior Support Escalation Engineer
Microsoft Customer Support and Services

Your comment has been posted.   Close
Thank you, your comment requires moderation so it may take a while to appear.   Close
Leave a Comment
  • 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_amd64\media to the FAT32 partition and your custom install.wim to the NTFS partition

    When 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:

    Boot

    Deploy

    EFI

    Files:-

    bootmgr

    bootmgr.efi

  • 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

  • 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/.../2845990

    As 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.

  • ISO2Disc is a freeware which allows to create a GPT bootable USB drive from WinPE ISO image: http://www.top-password.com/iso2disc.html

  • 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).

  • 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/

  • You need to have the usb drive set as a fixed drive not removeable.
    http://it-n-careerz.blogspot.com/2013/08/how-to-make-your-usb-fixed-disk-with_5360.html

    Steps 1-3 for a flash drive. Worked after that.

    27 Mar 2014 9:20 AM
    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).

  • 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

  • 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?

  • I'm willing to try this very soon as I need to be able to boot to a DOS environment to run my LLF utility.

    I just would also like to point out that you said FAT32 has a volume size limitation of 32GB. This is false! FAT32 supports up to 2TB. The 32GB limitation is strictly enforced by XP, Vista, Win 7 & Win 8 as MS strongly suggests using NTFS since it is needless to say more functional. At the same time, nobody in their right mind would format a 2TB as FAT32 anyway :)

    As far as UEFI not seeing a USB flash drive formatted as NTFS to be bootable... I'm not sure that should be a problem. I have actually had to format several of my flash drives as NTFS before they would boot due to the way certain motherboard BIOSes accessed the removable media. I hope that UEFI doesn't prevent me from using NTFS as an option because that would just be silly imo.

    Anyway, thanks for the info and I'm going to try this later. It won't be long before machines stop supporting the CSM/Legacy modes and then we won't be able to boot from much anything without this method! On the bright side, UEFI does eliminate the possibility of MBR infections!