d2vm icon indicating copy to clipboard operation
d2vm copied to clipboard

Support for UEFI with Grub2

Open christiantosta opened this issue 7 months ago • 4 comments

First off all, thanks for this great project! Is it possible to add support for boot with UEFI/GPT and Grub2?

christiantosta avatar Jul 01 '25 02:07 christiantosta

Hi @christiantosta , thanks for the kind words!

d2vm can already produce a UEFI-bootable image with GRUB 2 using --bootloader=grub-efi.

That will create a FAT32 EFI System Partition on a GPT disk and install GRUB2 in EFI mode.

Let me know if you run into any issues!

Adphi avatar Jul 04 '25 08:07 Adphi

FYI. grub2-install may throw this error:

grub2-install: error: This utility should not be used for EFI platforms because it does not support UEFI Secure Boot. If you really wish to proceed, invoke the --force option.
Make sure Secure Boot is disabled before proceeding.

I have no idea if this is distro or version specific (I'm building Rocky Linux VM on Fedora). I got around it with a change in grub-efi.go.

stuart11n avatar Jul 21 '25 19:07 stuart11n

Thanks @stuart11n for reporting this.

UEFI is not supported for CentOS and Rocky Linux isn’t officially on our support matrix, so you may run into issues like that one. If you need CentOS / Rocky Linux support, pull requests are more than welcome!

Adphi avatar Jul 22 '25 06:07 Adphi

Thanks @stuart11n for reporting this.

UEFI is not supported for CentOS and Rocky Linux isn’t officially on our support matrix, so you may run into issues like that one. If you need CentOS / Rocky Linux support, pull requests are more than welcome!

yeah it doesn't work :-)

I actually hit a similar issue to my first issue back in 2024:

https://github.com/linka-cloud/d2vm/issues/59

However, I got CentOS (and Rocky) working (BIOS mode), so I'll back-track and see if the issue in anyway similar.

stuart11n avatar Jul 23 '25 15:07 stuart11n