Partager via


Moving from BIOS to UEFI with MDT 8443

If you watched the Microsoft Mechanics video on MBR2GPT, the new tool for converting disks from MBR layout to GPT layout as part of the BIOS to UEFI conversion process, you may have spied an MDT task sequence being used.  I thought it would be useful to provide those as samples that you could use in case you want to perform this process using MDT.

First, it’s worth pointing out that there are a few different scenarios that you might want to do:

  • Converting an existing Windows 10 installation.  If you have a PC running Windows 10 with BIOS emulation, you can switch it in two different ways:
    • If you are already running Windows 10 1703, the process can be initiated from within the currently running OS, converting the disk layout and modifying the firmware settings, followed by a reboot.
    • If you are running an earlier version of Windows 10, the process can be initiated from within Windows PE from the ADK 1703 release, requiring a little extra work:  Reboot from the full OS into Windows PE, convert the disk layout, modify the firmware settings, then boot back into Windows 10.
    • You could also boot to a Windows PE 1703 boot image, then run a simple task sequence that converts the disk and modifies the firmware, booting back into the OS when done.
  • Converting as part of a Windows 10 upgrade.  This is actually very similar to previous processes:  Complete the upgrade, then convert the disk layout and modify the firmware settings.
  • Converting as part of a Windows 10 wipe-and-load (refresh) deployment.  This adds a couple of steps to the task sequence, adding steps after the new OS image has been deployed but before it has booted for the first time, running steps in Windows PE to convert the disk layout and to modify the firmware settings.

So the attached zip file includes sample task sequences for all of these.  Extract the zip file, open it with MDT 8443 as a new deployment share, then look at the task sequences.  (Remember you can copy-and-paste between task sequences, if you want to copy the steps into your own task sequences.)  I’ve stripped this deployment share down to the bare minimum, so you don’t need to download gigabytes worth of stuff, so don’t expect it be usable as-is.  But it does contain all the pieces you need:

  • Task sequences
    • Convert BIOS to UEFI (OS).  A task sequence designed to run in the full OS (modify firmware settings, convert disk layout, initiate reboot).
      image
      A few comments on this one:  The “Convert” group has a condition that will only run if the machine isn’t presently using UEFI boot.  The “Lenovo” step has a condition that will only run it on Lenovo PCs; you would need to add similar steps for other OEMs.
    • Convert BIOS to UEFI (OS-PE-OS).  A task sequence designed to be initiated from Windows 10 (any version) that performs the conversion from Windows PE (boot to PE, modify firmware settings, convert disk layout, boot back to OS).
      image
      Comments:  Similar to the previous task sequence, with extra steps to get from the current OS to Windows PE and then back again.  (This is the only task sequence that requires the modified ZTIBCDUtility.vbs script.)
    • Convert BIOS to UEFI (PE).  A task sequence designed to be initiated from Windows PE (boot from USB or PXE, modify firmware settings, convert disk layout).
      image
      Comments: This is actually identical to the first task sequence, without the FinishAction that makes the machine reboot.  (It will reboot automatically after the task sequence completes and you click “Finish” on the summary wizard.)
    • Convert with Refresh to Windows 10 Enterprise 1703 x64.  A standard refresh task sequence with extra steps added (modify firmware settings, convert disk layout) before the new OS boots for the first time.
      image
      Comments: The new steps are added right before booting into the new OS.  There might be other places that these steps could be placed, but these worked well for me.
    • Convert with Upgrade to Windows 10 Enterprise 1703 x64.  A standard upgrade task sequence with extra steps added (modify firmware settings, convert disk layout) after the upgrade completes.
      image
  • Scripts
    • Lenovo_UEFI.vbs.  A (very short) custom script to enable UEFI and Secure Boot on Lenovo PCs.  (I just happened to have Lenovo ThinkPad devices available for testing.  One thing that impresses me about these machines:  You don’t need any extra software to configure the firmware, the settings are exposed in WMI automatically.)
    • ZTIBCDUtility.vbs.  A modified version of the built-in MDT script to support the “OS-PE-OS” task sequence.  (In case you’re curious, check out the changes in the “AdjustBCDDefaults” function.  These changes make sure that MDT doesn’t make the Lite Touch Windows PE the default, which the MBR2GPT tool doesn’t like.  With the change, the PE boot image is set up as a one-time boot image.)
    • LTIBootback.wsf.  A new script designed to boot back into the current OS for the “OS-PE-OS” task sequence.  (This script removes the PE boot image BCD entry and deletes the boot.wim, before booting back to the full OS.)

I would suggest copying the task sequences (using Workbench) into your task sequence, then manually copying all the scripts from the “Scripts” folder of the downloaded deployment share into your own share’s “Scripts” folder (overlaying the ZTIBCDUtility.vbs file).  For the upgrade and refresh task sequences, you’ll then need to edit the copies to “reattach” a Windows 10 1703 OS to them.

As always, these are provided as-is, provided as samples.  They work for me Smile

Download: bios2uefi

Comments

  • Anonymous
    April 14, 2017
    Thanks for the great post. BIOS2UEFI does seem to be more successful within WinPE. MBR2GBP performs a validation prior to conversion. During testing in windows I have encountered occasions where the validation has failed and the disk was not converted. If the conversion is not performed and the device firmware is configured to UEFI then you would end up with a UEFI device without a GPT disk. A way around this would be to check the system disk partition type disk prior to Configuring UEFI in the firmware. Likewise i suppose the UEFI configuration could fail say if the firmware password has been changed and in this case we could result with a BIOS device without a bootable MBR partition.
  • Anonymous
    April 18, 2017
    This is fantastic, thanks for this. Only one observation is that for ThinkCenter PCs, they use a slightly different parameter to enable Secure Boot, in the Lenovo_UEFI.vbs script it has to be "Secure Boot,Enabled;"