How to Convert a Legacy Boot Windows 10 Template to UEFI
If you've got a DaDesktop machine here in Canada that you'd like to set up with GPU or other passthrough, you'll need to first switch it over to UEFI boot.
We still recommend using win10-template-v53 or newer, but if you'd rather do the upgrade yourself, here's what you'll need to do:
- Turn on the Defrag service
- Create boot files on the C drive
- Set the C disk as Active
- Convert the system to UEFI
- Update the KVM config to support UEFI
- Fix the DaDesktop BIOS boot option
- Upgrade the virtio-win drivers
- Disable the Defrag service
- Optional: Move the partition ahead of the system partition to allow automatic disk resizing
1. Turn on the Defrag service
- Open Command Prompt as an administrator
- Run:
sc config defragsvc start= demand
2. Make the C: drive bootable
-
In an admin Command Prompt, execute:
bcdboot.exe c:\windows /s c:
3. Set the C: disk as Active
- Open Disk Management
- Right-click the C: partition
- Set it as Active
4. Convert the system to UEFI
- In an admin Command Prompt, run:
mbr2gpt.exe /concver /allowFullOS
5. Modify the KVM config to support UEFI
- SSH into the ddnode
- Make sure you're running commands as root
-
Copy OVMF_VARS.fd and qemu.conf from a template that has UEFI boot, for example:
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 boot into the UEFI Shell
- Type: "exit"
- Go to Boot Management (TODO: FINISH IT)
- Press F10 to save
- Exit the BIOS
7. Upgrade the Virt-io drivers
Some templates may have an older VGA driver that can cause issues, like being unable to change the resolution. To sort this out:
- Download the latest drivers from 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 them (TODO: exact file name)
- Reboot
8. Disable the Defrag service
- Open Command Prompt as an administrator
- Run:
sc config defragsvc start= disabled
9. Optional: Move the partition ahead of the system partition to allow for automatic disk resizing
- Boot the system into Rescue mode
- Use GParted to shift the partition that's in front of the system partition
- Reboot
10. Install Idd drivers
- Visit: https://github.com/ge9/IddSampleDriver
- Download the release from: https://github.com/ge9/IddSampleDriver/releases
- Extract to C:\ (otherwise it won't work)
- Install the certificate (as root)
- Install the driver (right-click the .inf file and choose Install)