Install Windows Server 2012 R2 in UEFI Mode on USB

0. Here I leave notes on how to install windows server 2012 R2 on a USB attached HDD. I did all of below from Windows 8.1 Enterprise Evaluate edition on Virtualbox. 1. Run CMD as an administrator. 2. Partitioning

# Start diskpart.exe
# Show available disks
list disk
# Choose the disk
select disk 1
# Change label to gpt
convert gpt
# Create EFI partition of 100MB
create partition efi size=100
# Format as fat32
format quick fs=fat32 label="BOOT"
# Assign a windows drive letter of your preference.
assign letter=B
# Create OS partition of 128GB
create partition primary size=128000 format quick fs=ntfs label="OS"
assign letter=O
list volume

3. Installing the OS on USB

# Find available index number of edition.
dism /Get-WimInfo /WimFile:c:\install.wim
# Extract install.wim from the OS media, and place it on C drive root, and then run command below.
dism /apply-image /imagefile:c:\install.wim /index:2 /applydir:o:\

4. Install bootmgr on efi partion.

o:\windows\system32\bcdboot o:\windows /f ALL /s b:

5. Boot the PC from the USB drive, and finish the setup.

Leave a comment


  1. Hicham

     /  September 2, 2016

    Thanks for your post, unfortunately it didn’t work for me

    first of all, i’ve tried this tutorial in Windows 10, when it didn’t work, i’ve installed VirtualBox, a Windows 8.1 Enterprise Virtual Machine like you, but no success

    DISKPART> list disk

    DISKPART> select disk 1
    Disk 1 is now the selected disk.

    DISKPART> clean
    DiskPart succeeded in cleaning the disk.

    DISKPART> convert gpt

    DiskPart successfully converted the selected disk to GPT format.

    DISKPART> create partition efi size=100

    DiskPart succeeded in creating the specified partition.

    DISKPART> format quick fs=fat32 label=”BOOT”

    Virtual Disk Service error:
    The operation is not supported on removable media.

    DISKPART> create partition primary size=7710

    Virtual Disk Service error:
    The operation is not supported on a non-empty removable disk.

    the assign command also returned an error
    i’ve tried with 2 USB keys, one 8Go, the second is 4Go (less than the 5.x needed for 2012R2, but it was a try to see if the steps above are working or not)

    so, i must use an USB attached HDD instead of an USB key ?
    is there a workaround to get a success without using an HDD ?


    my real problem :
    i have an IBM x3650 server
    usually, IBM server must be installed thought IBM ServerGuide Media (ver 9.63)
    the problem, is once ServerGuide DVD configure RAID, Drives, Drivers, it ask for the DVD of 2012 R2 !!!

    i’ve installed the 2012 R2 ISO to an USB using Rufus (the USB drive was NTFS formatted in whole), but even i’ve inserted in,ServeGuide keep asking me the DVD of 2012 R2

    Searching the net, i’ve found that there is a possibility to copy the OS with ServerGuide in the same media, so once ServerGuide boot, it will search an subfolder in its media where the OS is stored

    my plan was following your tutorial, but instead of installing the 2012 R2 OS at the third step, i will install the ServerGuide OS, then i will add the 2012R2 OS in the subfolder
    (for this, i’ve converted the ISO of the ServerGuide to a WIM with imagex)

    well, it seems logical, but now, it become a nightmare

    Now i need a way to make the three first steps working
    for the fourth step, i am still looking for a way to Install bootmgr on the efi partition not for Windows 2012R2 but for the Serverguide 9.63, i am thinking about the “efibootmgr” command, but i still don’t how to do it exactly,
    there is /bootmgr and /bootmgr.efi at the root of ServerGuide OS
    there is also /EFI/Boot/bootx64.efi
    and also /Boot/BCD and /boot/boot.sdi

    also, the USB drive created with Rufus isn’t booting (i will try DISKPART using one partition later), so i really still don’t know if a full NTFS drive will boot or not, that’s why i need 2 partitions as you listed, the first EFI (FAT32) for boot , and the second NTFS for DATA

    can you help me please ?

    Thanks a lot

    • If you are trying to install Windows 10 on a USB stick, it does not matter what machine you use to boot from as long as the machine bios supports booting from USB device. So you don’t have to install windows bootmgr on your AIX? boot partition. You need to do that only when you want to install those OSes on the same device, which I currently do on my SSD disk to boot the both Arch Linux and Windows 10.

      The “The operation is not supported on removable media.” error suggests that
      that removable devices are not supported. So first, you need to make your USB media to be recognised as a local disk instead of removal media. Try googling by “convert removable disk to local disk”.

      Good luck!

      • Boujid

         /  September 4, 2016

        thanks lot for your reply
        i am not trying to install windows 10 on an USB

        In summary :
        I have a live DVD (IBM ServerGuide), the goal is to make its content on an USB media with a difference :
        The DVD has one partition, the USB will have 2 partitions, first one for boot containing just boot loader, while the second will contains the content of the DVD

        for sure i don’t have to install windows boot manager, i am wondering how can i make this scenario possible, i am thinking about using efibootmgr but not sure how to do it

        to avoid misunderstanding, for installing Windows on IBM servers, this is must be done through ServerGuide first
        (the content of windows OS will be copied in a subfolder of ServerGuide, so there is no booting directly from Windows media)

        so to install Windows on IBM, we must boot with the ServerGuide first

        Thanks for the removal to fixed, i’ve done some research but there is no standard method, it depends on the model and drivers of the USB, and it seems to be dangerous as the risk to make the USB unusuable is high

        i will look for an USB attached HDD

      • Can’t you simply use dd command to copy the dvd to usb?
        The step is like this.
        1. partition your usb
        2. Use dd command to copy the whole content of the dvd to the both partition of the usb.
        3. Erase the unnecessary data from the both partitions of the usb.

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: