grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Detecting running platform (specifically EFI) during runtime?


From: Colin Watson
Subject: Re: Detecting running platform (specifically EFI) during runtime?
Date: Mon, 7 Jan 2013 10:43:10 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

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 <address@hidden>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                                       address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]