I am developing a UEFI application which functions as a bootloader. It is required to handle loading between two Linux kernels dependending on which one failed last (A/B system). 
Is there a way to detect if the kernel failed to load/start successfully from the UEFI shell or application? I read that there is a hand-over of control to the OS at some point and the OS calls ExitBootService
but I am not sure about how to retrieve this information from the Shell? Does the return code get persisted in LastError variable? Also, do you know where in the Linux boot process the ExitBootService is called? I'm trying to figure out what actual Linux boot failures I can detect with the ExitBootService return code. For instance, could I detect kernel panic?

Currently, I have a catch all approach, where I persist a boot failure flag before loading the OS, then when the OS is booted successfully it clears the boot failure flag (I check this on boot to switch between systems). The problem is that this also catches power failure between setting and clearing the flag which is undesirable. 

Thanks
_._,_._,_

Groups.io Links:

You receive all messages sent to this group.

View/Reply Online (#107183) | | Mute This Topic | New Topic
Your Subscription | Contact Group Owner | Unsubscribe [rebecca@openfw.io]

_._,_._,_