How-To Install 2008 R2 on UEFI systems using GPT disk using MDT 2010 with update 1 RRS feed

  • Question

  • This post is a how-to on installing 2008 R2 on UEFI systems using GPT disk as this isn't documented anywhere correctly when using MDT 2010 with Update 1. How-to install 2008 R2 on UEFI systems using MBR disk will be posted at the end which will be a copy and paste of someone else's workaround.

    Before following the How-To's below, ensure that both of these KB articles have been followed first!




    How-To Install 2008 R2 on UEFI systems using GPT disk:

    To install Windows Server 2008 R2 with the use of GPT disks on servers which have a UEFI, you must complete the following:


    1. Within the MDT task sequence, you must disable the step “Format and Partition Disk” under Preinstall>New Computer Only container.
    2. Within the MDT task sequence, you must configure the operating system to install to DISK 0 PARTITION 2 under the “Install Operating System” step which is located under the Install container.
    3. Within the UNATTEND.xml file, you must remove the “InstallTo” object completely. This is located under the 1 windowsPE>Microsoft-Windows-Setup_neutral>ImageInstall>OSImage container.
    4. Within the UNATTEND.xml file, you must configure the “InstallToAvailableParition” property to “TRUE”. This setting is located in the 1 windowsPE>Microsoft-Windows-Setup_neutral>ImageInstall>OSImage container.
    5. Next we need to create a text file which will store the parameters required for DISKPART to create our partition structure on DISK 0 for us, you can use the below as a sample to create a single full logical C:\ drive.


    select disk 0


    convert gpt

    create partition efi size=200

    format quick fs=fat32 label="EFI"

    create partition msr size=128

    create partition primary

    format quick fs=ntfs label="SYSTEM"

    assign letter=C noerr


    1. Next we need to include this text file into your Windows PE image; you can use MDT to achieve this.
    2. Within the MDT task sequence, we need to add a “Run Command Line” step to your task and populate it with the following:

      Command Line:

    Diskpart /s <x:\filename.txt>


    Start in:


    To keep the same flow of deployment steps, you can place this task right above or below the “Format and Partition Disk” task that we disabled earlier.


    1. Once the above is completed, ensure to update the deployment share and use the newly modified WinPE image to boot up the UEFI enabled servers and then start your Task Sequence and everything should work correctly now.



    How-To Install 2008 R2 on UEFI systems using MBR DISK:


    Essentially you need to boot your UEFI system using "Legacy Mode" and there are also reports of Disabling "Legacy Thunk" to get it to work as well in combination.

    On our IBM x3650 M2 we completed both steps and we were able to install 2008 R2 on UEFI systems using MBR disks.


    Thursday, July 22, 2010 2:47 PM

All replies

  • Here is a quick summary on why this works...

    The Problem:


    The issue relies with the method and logic that MDT’s scripts use to query and validate that the proper disks, partitions and storage space reside before starting the installation of Windows.


    Essentially what you have configured in the Task Sequence and the UNATTEND.xml is analyzed by the MDT scripts then a validation is completed against the hardware in which you wish to install Windows on and if there are any errors you will be prompted with MDT Error or Warning dialogs.


    The problem is that the MDT scripts use WMI to query the hard disk, partition and free space requirements for Windows, but in the case of using GPT disk, the 2nd partition (MSR) that you have to create is hidden. The class that WMI uses for its query can’t see the MSR partition so instead of 3 partitions, it returns 2 in the query results; hence why DISK 0 PARTITION 3 doesn’t work as mentioned earlier when configured in the MDT Task Sequence.


    Although the above still confuses me as to why it works with DISK 0 PARTITION 2 since the WMI query results return PARTITION IDs 0 and 1 when it should return 1 and 2…


    The Windows Pre-Installation Environment however does see all 3 partitions correctly and we tried configuring in our Task Sequence to install Windows to DISK 0 and PARTITION 2 and in the UNATTEND.xml file to install Windows to DISK 0 and PARTITION 3 but due to timing issues of the way Windows installs with MDT, did this not work for us.

    Thursday, July 22, 2010 2:52 PM
  • Great posting, thanks...

    / Johan

    Friday, July 23, 2010 3:15 AM
  • Great posting Jason. However, after following your directions step by step we are running into issues!

    At the step "Install Operating System" the process fails and we get an error message:

    "Windows cannot locate the disk and partition in the unattended answer file's <ImageInstall> setting. Make sure the setting references a valid partition and restart installation."


    Can you help please.

    Monday, October 4, 2010 4:26 PM
  • It's alive!!!!!!!!!!!!!! Thanks a million, JasonSi!

    @omid_79: In my expereience that means one of two things:

    1. The diskpart gpt script didn't run.  To get it working on my setup I added the diskpart script to ..\DeploymentShare\Scripts and used the following for the command line step in the task sequence:

    Command Line:

    diskpart /s "%SCRIPTROOT%\GPT.txt"

    Start in:
    <left blank>

    I also named the step unique, Setup GPT Partitions, so I could watch the lite touch progress and see the step go by.

    2. You didn't boot via the UEFI boot manager.  Our 11G Dell servers have both a BIOS and UEFI boot mode.  If you boot in BIOS mode and try to install to a GPT partition the Windows setup throws errors.  You have to boot via the UEFI boot manager in order for LiteTouch and Windows setup to work with GPT disks.

    I like pie!
    • Edited by Jammrock Wednesday, January 5, 2011 4:12 PM typos
    Wednesday, January 5, 2011 4:11 PM
  • Great post.  Exactly what I needed, to the dot!

    But this is very annoying, since my company uses IBM System X and HP Proliant servers, I have to maintain distinct set of task sequences for MBR and GPT disks. This basically doubles up the task sequence options.

    If only there was a clear WMI call to distinguish between the two type, a condition could be added in the task sequence to either call the GPT diskpart script, or the standard "Partiiton Disk" task to partition an MBR disk.

    Hopefully MS will add that logic in an upcoming WDT or AIK update.

    Wednesday, March 16, 2011 3:43 PM
  • JasonSi, you are a legend. Thank you very much! Also thanks to Jammrock for the pointer on a good place to put the diskpart script. This has saved me hours of potential frustration :)
    Phil Wiffen
    Friday, March 25, 2011 11:51 AM
  • Thanks for this post, it worked first time and has saved me a bunch of frustrating hours trying to get it resolved.
    Thursday, October 20, 2011 10:12 PM
  • Hello JasonSi,

    I would like to use your steps to try installing Windows 7 x64.   Initially I received the error when trying to install the OS that read "Windows cannot be installed to this disk.  The selected disk has an MBR partition table. On EFI systems, Windows can only be installed to GPT disks".  After following your steps in this post I was able to finish the install.  Once finished the task sequence restarted the computer.  Now I'm getting an error that reads "Error 1962: No operating system found.  Press any Key to repeat boot sequence".  The BIOS is detecting the hard drive.  Do you know why the OS will not load?



    Thursday, January 19, 2012 9:45 PM
  • Fantastic Posting....Thanks a lot

    Rakesh Sahoo

    Wednesday, July 18, 2012 7:22 PM
  • Thanks.

    These changes work, however I have found that after making the changes drivers that have been injected through the task sequence cannot be found.

    I suspect the drivers are being inject sucessfully as no errors are mentiuned but perhaps it is going to the wrong partition and then getting lost.

    Any ideas? Has anyone else had this problem?


    Greg Turnbull

    Wednesday, September 12, 2012 1:48 AM
  • Hello everyone,


    We had the same problem for the 8200 SFF. This is how we made it work with MDT 2010. We were using discs though to boot and point it to the server.


    - Boot into BIOS.

    - Disable EFI under boot options, save and exit

    - F9 to select boot menu.

    - Under legacy CD/DVD drive, select Sata 2


    Hope this helps.



    Tuesday, September 18, 2012 5:09 PM
  • I had to set the directory otherwise the task failed.

    Start in:
    Friday, November 28, 2014 4:36 AM
  • Great post Jason,
    however... If you are trying to load Windows on a uEFI machine, please update your MDT deployment share to MDT 2012 Update 1 or MDT 2013 instead.

    Keith Garner - Principal Consultant [owner] - http://DeploymentLive.com

    Thursday, December 4, 2014 2:08 AM