Thank you both for the quick reply. Pascal's response with the
${grub_platform} variable is exactly what I was looking for. As for
the modules, the ones in question were "vbe" (specific to BIOS I
believe) and the efi_* modules. I also only wanted to load the font
stuff for EFI, so this works out perfectly.Thanks again. --Marc On Sun, Feb 12, 2017 at 11:41 AM, Andrei Borzenkov <[email protected]> wrote: > 12.02.2017 18:47, Pascal Hambourg пишет: >> Le 12/02/2017 à 15:49, Marc Smith a écrit : >>> >>> In my Linux distro, I'm using a single grub.cfg and the user can boot >>> in either BIOS or EFI mode. However, some modules are specific to EFI, >>> and some to BIOS it appears. >>> > > It would be helpful if you gave more details which modules you need. > GRUB tries to be compatible across platforms as far as booting is > concerned, so single grub.cfg can be reused. There are always > platform-dependent modules, but they usually are not needed for booting. > >>> Is there a way to test if we're "running" in EFI or BIOS mode in >>> grub.cfg and then use that to make a decision on what modules to load? >> >> See the $grub_platform environment variable. >> Its value is 'pc' for BIOS and 'efi' for EFI. >> >> However I have used the same config file (generated by >> update-grub/grub-mkconfig) with both GRUB BIOS and GRUB EFI without any >> visible issue. >> >> _______________________________________________ >> Help-grub mailing list >> [email protected] >> https://lists.gnu.org/mailman/listinfo/help-grub > _______________________________________________ Help-grub mailing list [email protected] https://lists.gnu.org/mailman/listinfo/help-grub
