Converting a Legacy Boot to UEFI on a Windows 10 Template

If you've got a DaDesktop machine that you'd like to use for GPU or other pass-through tasks, you'll first need to convert it to UEFI boot.

We still recommend using win10-template-v53 or later, but if you'd find it more beneficial to perform the upgrade yourself, here are the steps:

  1. Enable the defrag service
  2. Create boot files on the C: drive
  3. Set the C: drive as Active
  4. Convert the system to UEFI
  5. Modify the kvm config to support UEFI
  6. Fix the DaDesktop BIOS boot option
  7. Upgrade the virtio-win drivers
  8. Disable the defrag service
  9. Optional: move the partition in front of the system partition to support automatic disk resizing
     

1. Enable the Defrag Service

  1. Run cmd as Administrator
  2. Execute:
    sc config defragsvc start= demand

2. Make the C: Drive Bootable

  1. In an admin command prompt, run:

    bcdboot.exe c:\windows /s c:

3. Set the C: Drive as Active

  1. Open Disk Management
  2. Right-click the C: partition
  3. Set as Active
     

4. Convert the system to UEFI

  1. In an admin command prompt, run:
   mbr2gpt.exe /concver /allowFullOS

 

5. Modify the kvm Config to Support UEFI

  1. Log in via SSH to the ddnode
  2. Make sure to run the command as root
  3. Copy OVMF_VARS.fd and qemu.conf from a template that supports UEFI boot, e.g.:

    cp /var/lib/kvm/win10-template-v51/OVMF_VARS.fd /var/lib/kvm/yourimagename/
    cp /var/lib/kvm/win10-template-v51/qemu.conf /var/lib/kvm/yourimagename/

6. Fix the DaDesktop BIOS Boot Option

  1. Stop and start the machine using the dd4t.dadesktop.com GUI or API
  2. The system will boot into the UEFI Shell
  3. Type: "exit"
  4. Go to BootManagement TODO: FINISH IT
  5. F10 to save
  6. Exit the BIOS
     

7. Upgrade the Virt-io Drivers

Some templates might have an outdated version of the VGA driver, which can cause issues like being unable to change the resolution. To fix this:

  1. On your desktop, download the latest version of the drivers: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.240-1/virtio-win-0.1.240.iso
  2. Install: TODO exact file name
  3. Reboot
     

8. Disable the Defrag Service

  1. Run cmd as Administrator
  2. Execute:
    sc config defragsvc start= disabled

 

9. Optional: Move the Partition in Front of the System Partition to Support Automatic Disk Resizing

 

  1.  Boot the system in Rescue mode.
  2.  Use GParted to move the partition in front of the system partition.
  3.  Reboot

10. Install the Idd drivers

  1. https://github.com/ge9/IddSampleDriver
  2. Download it from here: https://github.com/ge9/IddSampleDriver/releases
  3. Extract to C:\ (otherwise it won't work)
  4. Install the certificate (as root)
  5. Install the driver (right-click the .inf file and select Install)