So I needed to switch over to UEFI on one of my VMs to try to solve an issue with multi-GPU passthrough I was having, but the couple of guides I was running into were all…convoluted and I was trying to be lazy. I stumbled on to a simple process that i’ll detail below so that others with similar issues will hopefully find it helpful.
This isn’t intended to be a in-depth newbie guide, you should know your way around proxmox/linux already (or at least know how to find additional answers)
I did this on a Ubuntu 23.04 VM on Proxmox, with ext4 partitions, but it should be adaptable to other Linux distros
-
First, you know you’ll be screwing with partitions in this guide, so be sure to shutdown your VM and make a copy of your bootdisk using what ever method you prefer, I used dd from the Proxmox shell to make an image from the LVM partition
dd if=/dev/pve/vm-<VM-ID>-disk-<DISK-ID> of=/somewhere/safe/vm-<VM-ID>-disk-<ID>.raw
-
Download a LiveCD ISO called boot-repair-disk from https://sourceforge.net/projects/boot-repair-cd/ load it into ISO storage, attach it to your target VM
-
Edit your VM hardware config BIOS from SeaBIOS to OVMF and start it up
-
Open the VM console and hit ESC when you see the Proxmox to get to the UEFI boot manager and select the dvd option
-
Once the liveCD loads to the Mint Desktop, you’ll get a popup from the boot repair script, just move it to the side for now and open GParted from the start menu
-
- delete the 1MB grub core.img partition (This is only for legacy boot, and we’ll be rebuilding grub anyways)
-
- shrink the next partition over by 127MB preceeding the partition your editing (The EFI partition needs to be first (you can also get away with MUCH less space but eh whats a few megs these days anyways))
-
- Create a FAT32 partition in the now 128MB (1MB from before + 127 from shrinking) unallocated space
-
Hit apply and then right click the new EFI partition, select the flags option and then checkmark the esp option (it should automatically check the boot flag as well) then hit OK and close out of GParted
-
Continue with that popup from earlier, when you get to the window with 2 big buttons, hit advanced and double check all the auto-choosen paritions are correct in the second tab and then hit apply
-
Follow the script’s prompts from here and you should be good