On Sat, Jan 05, 2013 at 05:17:18PM +0530, Keshav P R wrote: > 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? > > 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
I have now documented the grub_cpu and grub_platform environment variables in docs/grub.texi in trunk. (When explaining something not documented in the manual, please consider whether it would be useful to propose a documentation patch.) Cheers, -- Colin Watson [[email protected]] _______________________________________________ Grub-devel mailing list [email protected] https://lists.gnu.org/mailman/listinfo/grub-devel
