Transforming Legacy Boot to UEFI on Windows 10 Templates

If you are working with a DaDesktop machine and intend to utilize GPU passthrough or similar features, the initial requirement is to transition from Legacy boot to UEFI.

While we strongly advise using win10-template-v53 or a newer version, you may choose to perform the upgrade manually if it better suits your needs. The procedure involves the following sequence:

  1. Activating the defrag service
  2. Generating boot files on the C drive
  3. Marking the C disk as Active
  4. Converting the system architecture to UEFI
  5. Adjusting the KVM configuration for UEFI compatibility
  6. Correcting the DaDesktop BIOS boot settings
  7. Updating virtio-win drivers
  8. Deactivating the defrag service
  9. Optionally: Repositioning the partition ahead of the system partition to enable automatic disk resizing
     

1. Activate Defrag Service

  1. Open Command Prompt as Administrator
  2. Run the following command:
    sc config defragsvc start= demand

2. Make C: Drive Bootable

  1. Execute the following in an admin Command Prompt:

    bcdboot.exe c:\windows /s c:

3. Mark C: Drive as Active

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

4. Convert System to UEFI

  1. Execute the following in an admin Command Prompt:
   mbr2gpt.exe /concver /allowFullOS

 

5. Update KVM Config for UEFI Support

  1. Connect to ddnode via SSH
  2. Ensure commands are executed with root privileges
  3. Cover OVMF_VARS.fd and qemu.conf from a template that already supports UEFI boot, such as:

    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. Correct DaDesktop BIOS Boot Settings

  1. Restart the machine via the dd4t.dadesktop.com GUI or API
  2. The system should boot into the UEFI Shell
  3. Enter: "exit"
  4. Navigate to BootManagement TODO: FINISH IT
  5. Press F10 to save changes
  6. Exit the BIOS
     

7. Update Virt-io Drivers

Outdated VGA drivers in certain templates may lead to issues, such as an inability to adjust screen resolution. To resolve this:

  1. Download the latest driver version to your desktop: 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 the drivers: TODO exact file name
  3. Reboot the system
     

8. Deactivate DEFRAG Service

  1. Open Command Prompt as Administrator
  2. Execute the following:
    sc config defragsvc start= disabled

 

9. Optional: Reposition Partition for Automatic Disk Resizing

 

  1.  Boot the system in Rescue mode
  2.  Use gparted to move the partition before the system partition
  3.  Reboot

10. Install Idd Drivers

  1. https://github.com/ge9/IddSampleDriver
  2. Download from here: https://github.com/ge9/IddSampleDriver/releases
  3. Extract files to c:\ (required for functionality)
  4. Install the certificate (as root)
  5. Install the driver (right-click the .inf file and select Install)