Detect if bios or uefi possible?
|
2015-12-04, 01:46
Post: #1
|
|||
|
|||
Detect if bios or uefi possible?
Is there a function similar to how you can check if you are booted via BIOS or UEFI in a menu simliar to how you can check cpu architecture? My current setup is 2 different static menus, one for each boot mode as certain options dont work in UEFI. I am using dual boot usb sticks via syslinux>ipxe.lkrn and ipxe renamed to BOOTX64.EFI so that way I can support as many different models of computers as possible.
|
|||
2016-01-02, 08:34
Post: #2
|
|||
|
|||
RE: Detect if bios or uefi possible?
(2015-12-04 01:46)layzer253 Wrote: Is there a function similar to how you can check if you are booted via BIOS or UEFI in a menu simliar to how you can check cpu architecture? My current setup is 2 different static menus, one for each boot mode as certain options dont work in UEFI. I am using dual boot usb sticks via syslinux>ipxe.lkrn and ipxe renamed to BOOTX64.EFI so that way I can support as many different models of computers as possible. You can use the 'platform' function/command to test if a client is booted in Legacy or EFI, http://ipxe.org/cfg/platform Code: iseq ${platform} efi && goto is_efi || goto not_efi I also had separate menus for both types, but got tired of updating two files whenever i make a simple change or added something, so now i have one menu, and if a certain program needs doesn't support EFI or needs some special option i use, IMO this is batter then having separate files. Here's an example: Code: :rhel67 |
|||
2016-01-02, 14:12
(This post was last modified: 2016-01-03 03:19 by MultimediaMan.)
Post: #3
|
|||
|
|||
RE: Detect if bios or uefi possible?
But as far as the iPXE Binary goes, you need to go up one level to the DHCP server, otherwise, if the machine attempts to boot an incompatible iPXE binary, it will bring things to a halt:
DHCP Server Settings (ISC DHCPd -compliant): Robinsmidrod has an excellent example on his githhub page: https://gist.github.com/robinsmidsrod/4008017 Relevant Excerpt: Code: # Make sure the iPXE we're loading supports what we need, As far as platform detection goes in scripts, there are a couple of ways to do it which allow for minimal repetition of code; it is also important to preserve the iPXE environment in the event of a failure for either another boot attempt or an alternate path of action: Code: cpuid --ext 29 && set arch x86_64 || set arch i386 ; echo ${platform} ${arch} "Thus far, you have been adrift within the sheltered harbor of my patience..." |
|||
« Next Oldest | Next Newest »
|
User(s) browsing this thread: 1 Guest(s)