On Sat, Jan 5, 2013 at 2:58 PM, Andrey Borzenkov <[email protected]>wrote:
> Is it possible to check at run-time on which platform we are running. > Specifically, any way to distinguish between EFI and legacy BIOS? > > TIA > > -andrey > > _______________________________________________ > Grub-devel mailing list > [email protected] > https://lists.gnu.org/mailman/listinfo/grub-devel > Something like below should work (requires grub 2.00, not 1.99): [CODE - part of grub.cfg] if [ "${grub_platform}" == "efi" ]; then set _GRUB_PLATFORM="UEFI" if [ "${grub_cpu}" == "x86_64" ]; then set _UEFI_ARCH="x64" fi if [ "${grub_cpu}" == "i386" ]; then set _UEFI_ARCH="ia32" fi insmod efi_gop insmod efi_uga fi if [ "${grub_platform}" == "pc" ]; then set _GRUB_PLATFORM="BIOS" insmod vbe insmod vga fi [/CODE] Regards. Keshav
_______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
