Converting a Windows 10 Template from Legacy Boot to UEFI
If you have a DaDesktop machine and need to use a GPU or other pass-through, you'll first need to convert it to UEFI boot.
We still recommend starting with win10-template-v53 or newer, but if you'd rather perform the upgrade yourself, follow these steps:
- Enable the defrag service
- Create boot files on the C drive
- Mark the C disk as Active
- Convert the system to UEFI
- Modify 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. Enable the Defrag Service
- Open Command Prompt as an administrator
- Execute:
sc config defragsvc start= demand
2. Make the C: Drive Bootable
-
Run the following command as an administrator in the command line:
bcdboot.exe c:\windows /s c:
3. Set the C: Disk as Active
- Open Disk Management
- Right-click the C: partition
- Select "Set Active"
4. Convert the System to UEFI
- From an admin command prompt, run:
mbr2gpt.exe /concver /allowFullOS
5. Modify the KVM Config to Support UEFI
- Log into ddnode via SSH
- Make sure you run 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 boot into the UEFI Shell
- Type: "exit"
- Go to Boot Management (TODO: FINISH IT)
- Press F10 to save
- Exit the BIOS setup
7. Upgrade the Virt-io Drivers
Some templates may contain an outdated VGA driver that causes issues such as being unable to change the display resolution. To fix this:
- Download the new 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: (TODO: exact file name)
- Reboot
8. Disable the Defrag Service
- Open a command prompt as administrator
- Execute:
sc config defragsvc start= disabled
9. Optional: Move the Partition Ahead of the System Partition to Enable Automatic Disk Resizing
- Boot the system into Rescue mode
- Use GParted to move the partition ahead of the system partition
- Reboot
10. Install IDD Drivers
- https://github.com/ge9/IddSampleDriver
- Download from here: https://github.com/ge9/IddSampleDriver/releases
- Extract to C:\ (otherwise it will not work
- Install the certificate (as root)
- Install the driver (right-click the .inf file and install)