UEFI Bootable External USB Drive

In this blog I am going to discuss how to create a bootable USB drive for UEFI (Unified Extensible Firmware Interface) devices running Microsoft operating systems (Windows 8.1 or Windows RT 8.1). As an owner of a UEFI system such as Surface Pro, you could use a bootable USB drive as a recovery media or maybe to create and deploy images. But there is an obstacle; UEFI based systems require that all boot files reside on FAT32 partition which has a 4GB individual file size limitation. If any of the image files to be deployed are larger than 4GB you would not be able to store that file on the USB drive with formatted FAT32 partition. To work around this problem, you have two alternatives:

Split a Windows image file

Deployment Image Servicing and Management (DISM) tool supports the /split-image command and could be used as described in the following example:

Dism /Split-Image /ImageFile:C:\install.wim /SWMFile:E:\images\install.swm / FileSize:4700

  1. C:\images\install.wim is the name and the location of the image file that you want to split.
  2. E:\images\install.swm is the destination name and the location for the split .wim files.
  3. 4700 is the maximum size in MB for each of the split .wim files to be created.

To apply an image from the E:\Images folder using DISM /Apply-Image command, type the following:

Dism /apply-image /imagefile:install.swm /swmfile:E:\Images\install*.swm /index:1 / applydir:C:\

As you can see it is possible to use wildcard characters. For example, “E:\images\install*.swm” will apply all of the split files in the E:\image directory named install1.swm, install2.swm, and so on.

Create multiple partition USB drive

Not all USB devices are created equal. Most USB Flash sticks report themselves as removable but the USB connected Hard Drives report themselves as FIXED disks, and therefore allow us to create multiple partitions on this type of the USB external drives.

In my blog “WinPE – Dual Boot External USB Drive”, I explored an idea of using WinPE 5.0 and External USB Drive to create a simple solution for capturing and deploying images with ImageX.exe tool. Here, I will use the same idea with one important difference – creation of multiple partitions on a single USB drives that report themselves as FIXED disks. The first partition is formatted as FAT32 with label name “WinPE” and the second one is formatted with NTFS file system, labelled “ImageData”, and available for storing image files larger than 4GB. All bootable files are copied to the “WinPE” partition and therefore visible to all UEFI systems.

How this app – Create UEFI Bootable External USB Drive gets installed

  • You need to have Windows ADK 8.1 installed; download the Windows Assessment and Deployment Kit (Windows ADK) for Windows 8.1 Update here: http://www.microsoft.com/en-us/download/details.aspx?id=39982.
  • Download WinPE-UEFI-BootExternalUSBDrive.zip package from the download section, under Application folder. After you download the file, please do the following:
  1. Unzip the file (for example C:\ WinPE-UEFI-BootExternalUSBDrive).
  2. Connect your external USB Drive to your computer.
  3. Find the Create-UEFIBootabletExternalUSBDrive_x64.exe file (there are two files: one for 32 bit and one for 64 bit architecture, I am using in my example the 64 bit executable).
  4. Ran as administrator the Create-UEFIBootabletExternalUSBDrive_x64.exe tool in order to create Media files that are necessary to make the external USB drive bootable.

Again, this is a two steps process, as shown in the picture below:

UEFI_SelectFolder_01

Picture 01: in the first step you will select the source folder and start creating Bootable Media files

During the first step, please select the folder named WinPE-UEFRI-BootExternalUSBDrive by clicking ‘Browse Source’ button, and once this folder is selected, please click ‘Start’ button to start creation of the Media files (i.e. the files and applications essential for booting USB drive). Please do not close PowerShell Command line windows as shown below.

UEFI_CreatingMedia_02

Picture 02: UEFI bootable Media files being created, do not close command line window

Once all Media files are created, please proceed to the second step in order to make External USB Drive bootable. First click on ‘View Drive(s)’ button to display all available drives. In my example, three drives are detected. Drive # 0 with Windows OS installed and assigned letter ‘C’; drive # 1 is a USB Flash Drive with assigned letter ‘E’ that reports itself as removable, and drive #2 is an external USB drive with letter ‘G’ that reports itself as Fixed. The column named ‘PartitionType’ with its green / red background color will help you select one or more external USB drives form the list, and (for the ‘green’ ones that you want to have partitioned and bootable) click ‘Run’ button. Please note that this process will delete any data previously stored on the selected drive(s).

UEFI_ListDrives_03

Picture 03: Select drive with green background color and Media files are copied to the selected USB drive; in this example drive with Disk Number -2 and Drive Letter – G.

Finally, at the end of the second step, you will have a bootable USB drive. If you explore the contents of the newly created UEFI bootable external USB drive you will see the list of folders as displayed in the picture below.

TwoPartitions_04

Picture 04: List of folders and files on the newly created UEFI external USB drive

 

 

Please do not delete any of the listed folders. The second partition has folder named ‘Images’, and this folder has one subfolder (with name 32-BIT or 64-BIT) which serves as a container for all images files. During the First Step, by clicking a radio button to select 32-BIT or 64-BIT option, you determine the version of bootable files and image tools (like DISM and ImageX.exe command line tools) to be copied to the bootable ‘WinPE’ partition and used in creation of image files, as well as the name of the subfolder inside the ‘Images’ folder on the partition labelled ‘ImageData’. The other folder on the second partition, named ‘Owner Files’ is there to house all the other data files that you want to have stored on the external USB drive.

To see how UEFI Bootable External USB Drive works, please check my blog “WinPE – Dual Boot External USB Drive”, and read the sections under subtitle: ‘How WinPE – Dual Boot External USB Drive works’. The application has the same functions and the same interface (with three tabs: Computer Info, Create Image and Apply Image) as described there.

Please note that download includes a small utility named ProduKey from www.nirsot.net which displays the Windows ProductID and the CD-Key of Microsoft Office; sometimes Antivirus scanner reports that a program is infected with a Virus or Trojan, even when the program is not really infected with any malicious code. This kind of problem is known as “False Positive” or “False Alert”, and it’s quite a common problem in some of the password recovery tools provided in NirSoft Web site.

To download the WinPE – UEFI Bootable External USB Drive application, please go to the site’s download section, and expand the Application folder. In December 2015, I updated the scripts for UEFI devices (low and high resolution). If you want to download the updated scripts , please go to the site’s download section, expand the Application folder and select: WinPE-Sysprep. To get more info about these updated scripts, pleas check this post.


Please note: Although the author has made every reasonable attempt to achieve complete accuracy of the content, he assumes no responsibility for errors or omissions. Also, you should use this information as you see fit, and at your own risk.

 

One thought on “UEFI Bootable External USB Drive

Leave a Reply

Your email address will not be published. Required fields are marked *