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:
- Activating the defrag service
- Generating boot files on the C drive
- Marking the C disk as Active
- Converting the system architecture to UEFI
- Adjusting the KVM configuration for UEFI compatibility
- Correcting the DaDesktop BIOS boot settings
- Updating virtio-win drivers
- Deactivating the defrag service
- Optionally: Repositioning the partition ahead of the system partition to enable automatic disk resizing
1. Activate Defrag Service
- Open Command Prompt as Administrator
- Run the following command:
sc config defragsvc start= demand
2. Make C: Drive Bootable
-
Execute the following in an admin Command Prompt:
bcdboot.exe c:\windows /s c:
3. Mark C: Drive as Active
- Open Disk Management
- Right-click the C: partition
- Select Set Active
4. Convert System to UEFI
- Execute the following in an admin Command Prompt:
mbr2gpt.exe /concver /allowFullOS
5. Update KVM Config for UEFI Support
- Connect to ddnode via SSH
- Ensure commands are executed with root privileges
-
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
- Restart the machine via the dd4t.dadesktop.com GUI or API
- The system should boot into the UEFI Shell
- Enter: "exit"
- Navigate to BootManagement TODO: FINISH IT
- Press F10 to save changes
- 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:
- 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
- Install the drivers: TODO exact file name
- Reboot the system
8. Deactivate DEFRAG Service
- Open Command Prompt as Administrator
- Execute the following:
sc config defragsvc start= disabled
9. Optional: Reposition Partition for Automatic Disk Resizing
- Boot the system in Rescue mode
- Use gparted to move the partition before the system partition
- Reboot
10. Install Idd Drivers
- https://github.com/ge9/IddSampleDriver
- Download from here: https://github.com/ge9/IddSampleDriver/releases
- Extract files to c:\ (required for functionality)
- Install the certificate (as root)
- Install the driver (right-click the .inf file and select Install)