Converting Legacy Boot to UEFI for Windows 10 Template
If you've got a DaDesktop machine you want to use with a GPU or other pass-through device, you'll need to convert it to UEFI boot first.
We still recommend using win10-template-v53 or above, but if you feel it's more beneficial to carry out the upgrade yourself, here are the steps:
- Enable the defrag service
- Make the C: drive bootable
- Set C: drive as active
- Convert the system to UEFI
- Modify the KVM config to support UEFI
- Fix the DaDesktop BIOS boot option
- Upgrade VirtIO drivers
- Disable the defrag service
- Optional: move a partition in front of the system partition to support automatic disk resizing
1. Enable the Defrag Service
- Open Command Prompt as administrator
- Execute:
sc config defragsvc start= demand
2. Make the C: Drive Bootable
-
In Command Prompt, run as administrator:
bcdboot.exe c:\windows /s c:
3. Set the C: Drive as Active
- Open Disk Management
- Right-click on the C: partition
- Set Active
4. Convert the System to UEFI
- In Command Prompt, run as administrator:
mbr2gpt.exe /concver /allowFullOS
5. Modify the KVM Config to Support UEFI
- Log in via SSH to the ddnode
- Ensure you run the commands as root
-
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
- Stop and start the machine using the dd4t.dadesktop.com GUI or API
- The system will then boot into the UEFI Shell
- Type "exit"
- Go to Boot Management (TODO: FINISH IT)
- F10 to save
- Exit BIOS
7. Upgrade VirtIO Drivers
Some templates may contain an outdated VGA driver, leading to issues like the inability to change screen resolution. To sort this out:
- On your desktop, download the latest version of the drivers from: https://fedorapeople.org/groups/virt/virtio-win/direct-downloads/archive-virtio/virtio-win-0.1.240-1/virtio-win-0.1.240.iso
- Install: (TODO exact file name)
- Reboot
8. Disable the Defrag Service
- Open Command Prompt as administrator
- Execute:
sc config defragsvc start= disabled
9. Optional: Move a Partition in Front of the System Partition to Support Automatic Disk Resizing
- Boot the system into Rescue mode
- Use GParted to move the partition in front of the system partition
- Reboot
10. Install Idd Drivers
- https://github.com/ge9/IddSampleDriver
- Download it from here: https://github.com/ge9/IddSampleDriver/releases
- Extract on c:\ (otherwise it will not work
- Install certificate (as root)
- Install the driver (right-click on the .inf file and Install)
