Transitioning from Legacy Boot to UEFI for the Windows 10 template

Should you be operating a DaDesktop machine where GPU or other pass-through capabilities are required, a prerequisite is converting the system to UEFI boot.

While we advise utilizing win10-template-v53 or any subsequent version, those preferring a manual upgrade may follow the procedure outlined below:

  1. Activate the defrag service
  2. Generate boot files on the C drive
  3. Designate the C disk as Active
  4. Transition the system to UEFI mode
  5. Adjust KVM configuration for UEFI compatibility
  6. Correct the DaDesktop BIOS boot settings
  7. Update virtio-win drivers
  8. Deactivate the defrag service
  9. Optional: Reposition the partition before the system partition to enable automatic disk resizing
     

1. Enable the Defrag service

  1. Launch the Command Prompt with Administrator privileges
  2. Execute the following command:
    sc config defragsvc start= demand

2. Make the C: disk bootable

  1. Run the following in the command line as an administrator:

    bcdboot.exe c:\windows /s c:

3. Set the C: disk as Active

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

4. Convert the system to UEFI

  1. Run the following in the command line as an administrator:
   mbr2gpt.exe /concver /allowFullOS

 

5. Modify KVM configuration for UEFI support

  1. Connect to ddnode via SSH
  2. Ensure commands are executed as the root user
  3. Copy OVMF_VARS.fd and qemu.conf from a template that 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. Fix the DaDesktop BIOS boot option

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

7. Upgrade Virt-io drivers

Certain templates may include outdated VGA drivers, which can lead to issues such as inability to change 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. Disable the DEFRAG Service

  1. Launch the Command Prompt with Administrator privileges
  2. Execute the following command:
    sc config defragsvc start= disabled

 

9. Optional: Reposition partition to support automatic disk resizing

 

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

10. Install Idd drivers

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