Installing Windows 8.1 from a USB Stick under a UEFI BIOS and Secure Boot.

When Building a Windows UEFI system there are a few things to know that are different from when building an old BIOS based machine. First your USB install stick has be be formatted with FAT32 and Not NTFS. Second your UEFI motherboard probably has a Compatibility Support Module (CSM) mode that is set for BIOS compatibility. You need to turn that off if you want to enable UEFI, Secure Boot, and booting from a GPT partitioned disk.

The 11 steps for manually preparing / building a USB Disk to be a bootable Win 8.1 Install.
This bootable USB stick will work for both older BIOS installs as well as the newer UEFI installs.

1. Diskpart (Run from a CMD prompt)
2. List Disk
3. Select Disk # (Where # is the number of your USB disk)
4. Clean (removes any partitions on the USB disk, including any hidden sectors)
5. Create Partition Primary (Creates a new primary partition with default parameters)
6. Select Partition 1 (Focus on the newly created partition)
7. Active (Sets the selected partition to an active valid system partition state)
8. Format FS=fat32 quick (Formats the partition with the FAT32 file system. FAT32 is needed instead of NTFS so that it can load under the secure boot UEFI BIOS.)
9. Assign (Assigns the USB drive a drive letter)
10. Exit
11. Copy all the files from the Windows 8.1 DVD to the USB Stick.

For More information on on UEFI and Installing Windows to these machines here are some links:
Happy System Building! –Brian

For more information on UEFI BIOS and Secure Boot in Windows 8.1

Installing Windows on UEFI-based Computers

Boot to UEFI Mode or Legacy BIOS mode

69 out of 150 rated this helpful - Rate this topic

Updated: December 9, 2013

Applies To: Windows 8, Windows 8.1, Windows Server 2012, Windows Server 2012 R2

Boot into UEFI mode or legacy BIOS-compatibility mode when installing Windows from your USB, DVD, or network location.

If you install Windows using the wrong mode, you won’t be able to use the features of that firmware mode without reformatting the drive.

Select the firmware mode during bootup

Boot the PC. As the firmware starts to run, press the key that opens the boot device menu. For example, press the Esc, F2, F9, F12, or other key to enter the firmware or boot menus.

On the boot device menu, select the command that identifies both the firmware mode and the device. For example, select UEFI USB Drive or Network - BIOS.

Note
You might see separate commands for the same device. For example, you might see UEFI USB Drive and BIOS USB Drive. Each command uses the same device and media, but boots the PC in a different firmware mode.

If a boot device option does not appear for your device:

Check the options in the firmware menus to enable or disable BIOS-compatibility mode.

To use BIOS-compatibility mode, check for options in the firmware menus to disable UEFI SecureBoot features.

For older PCs (Windows®7-era or earlier), look for options to Boot from file, and browse to the \EFI\BOOT\BOOTX64.EFI file on that device.

Use any of these methods to help make sure that Windows is installed using the correct firmware mode

If you install Windows by using Windows Setup or the Windows installation DVD, use preformatted hard drive on your destination PCs. Use the GPT file format for UEFI mode, or the MBR file format for BIOS mode. When Windows Setup runs, if the PC is booted to the wrong mode, Windows will fail to install. For more info, see Windows Setup: Installing using the MBR or GPT partition style.

You can remove the UEFI or BIOS boot files from either Windows PE or Windows Setup. For example, if you only include boot files for UEFI mode on the Windows installation DVD, and during manufacturing you accidentally attempt to boot the PC to BIOS mode, the PC will immediately fail to boot, and you can begin troubleshooting right away.

UEFI: To prevent Windows Setup or Windows PE from booting in BIOS mode, remove the bootmgr file on the root of the media.

BIOS: To prevent Windows Setup or Windows PE from booting in UEFI mode, remove the efi folder on the root of the media.

From Windows PE, you can check the GetFirmwareEnvironmentVariable function. For more info, see WinPE: Boot in UEFI or legacy BIOS mode.

Windows Setup: Installing using the MBR or GPT partition style

302 out of 368 rated this helpful - Rate this topic

Updated: December 9, 2013

Applies To: Windows 8.1

When installing Windows on UEFI-based PCs using Windows Setup, your hard drive partition style must be set up to support either UEFI mode or legacy BIOS-compatibility mode.

For example, if you receive the error message: “Windows cannot be installed to this disk. The selected disk is not of the GPT partition style”, it’s because your PC is booted in UEFI mode, but your hard drive is not configured for UEFI mode. You’ve got a few options:

  1. Reboot the PC in legacy BIOS-compatibility mode. This option lets you keep the existing partition style. For more info, see Boot to UEFI Mode or Legacy BIOS mode.
  2. Reformat the drive for UEFI by using the GPT partition style. This option lets you use the PC’s UEFI firmware features.
    You can do this yourself by reformatting the drive using the instructions below, or if you need to preserve the data, use a third-party utility to convert the drive to GPT format.

Why should I convert my drive?

Many PCs now include the ability to use the UEFI version of BIOS, which can speed up boot and shutdown times and can provide additional security advantages. To boot your PC in UEFI mode, you'll need to use a drive formatted using the GPT drive format.

Many PCs are ready to use UEFI, but include a compatibility support module (CSM) that is set up to use the legacy version of BIOS. This version of BIOS was developed in the 1970s and provides compatibility to a variety of older equipment and network configurations, and requires a drive that uses the MBR drive format.

However, the basic MBR drive format does not support drives over 4TB. It's also difficult to set up more than four partitions. The GPT drive format lets you set up drives that are larger than 4 terabytes (TB), and lets you easily set up as many partitions as you need.

Reformatting the drive using a different partition style

To wipe and convert the drive by using Windows Setup

  1. Turn off the PC, and put in the Windows installation DVD or USB key.
  2. Boot the PC to the DVD or USB key in UEFI mode. For more info, see Boot to UEFI Mode or Legacy BIOS mode.
  3. When choosing an installation type, select Custom.
  4. On the Where do you want to install Windows? screen, select each of the partitions on the drive, and select Delete. The drive will show a single area of unallocated space.
  5. Select the unallocated space and click Next. Windows detects that the PC was booted into UEFI mode, and reformats the drive using the GPT drive format, and begins the installation.

To manually wipe a drive and convert it to GPT:

  1. Turn off the PC, and put in the Windows installation DVD or USB key.
  2. Boot the PC to the DVD or USB key in UEFI mode. For more info, see Boot to UEFI Mode or Legacy BIOS mode.
  3. From inside Windows Setup, press Shift+F10 to open a command prompt window.
  4. Open the diskpart tool:

Copy

diskpart

  1. Identify the drive to reformat:

Copy

list disk

  1. Select the drive, and reformat it:

Copy

select disk <disk number>

clean

convert gpt

exit

  1. Close the command prompt window.
  2. Continue the Windows Setup installation.

When choosing an installation type, select Custom. The drive will appear as a single area of unallocated space.

Select the unallocated space and click Next. Windows begins the installation.

Make sure Windows Setup boots to the correct firmware mode

To automate this process, you'll need to run Windows Setup through Windows PE, and use a script to detect which mode you’re in before installing Windows. For more info, see WinPE: Boot in UEFI or legacy BIOS mode.