Closed mvk15 closed 5 years ago
This is good, however, I think EFI should be opt in for the user, there may be some platforms that advertise EFI support but don't really support it (well), I'm thinking virtual machines for example.
We could do that seamlessly by checking for an EFI partition and just proceed with regular grub if the user hasn't specified it, or use a parameter.
I thought about it and probably a good option will be adding some variable (for example "efi_system") with values "yes", "no" and "auto". By default can be "auto" for example. "yes" and "no" as force options.
BTW, Yesterday I was installing two servers with your role. And those servers support only EFI. As a result, added EFI support :)
Added boolean variable "use_efi" for enabling or disabling EFI support. "yes" - means auto. Force "yes" - doesn't make any sense because of on a system without EFI is possible to install "grub-efi" but it is broken anyway.
~I think you can even install both at the same time, the packages don't conflict. I'll give this a test later.~ Thank you for your work.
Unfortunately, they are conflicted:
# apt-get install grub-pc grub-efi
Reading package lists... Done
Building dependency tree
Reading state information... Done
Some packages could not be installed. This may mean that you have
requested an impossible situation or if you are using the unstable
distribution that some required packages have not yet been created
or been moved out of Incoming.
The following information may help to resolve the situation:
The following packages have unmet dependencies:
grub-efi : Depends: grub-efi-amd64 (= 2.02~beta3-5+deb9u1) but it is not going to be installed
E: Unable to correct problems, you have held broken packages.
Interesting, I was thinking that works.
The only thing missing here is documentation for the use_efi
variable, then it's good to merge.
Added description for use_efi
option in documentation; removed a mention about UEFI in "Limitation" section; fixed formatting for some lines in "Global variables" section.
EFI support