UEFI. Running grub only once functionality
Hello everybody.
<#inbox>
I got situation: I need to load linux kernel from grub, that can easily fail on some computers (even in production). I use grub to load this and the only this kernel.
So, what I want to do is to load another OS loader, if grub (or more specificly my kernel) fails.
I know that UEFI supports this functionality (BootNext variable, UEFI Spec 3.1.2)
"The boot manager is also required to initiate a boot of the boot option specified by the BootNext variable as the first boot option on the next boot, and only on the next boot. The boot manager removes the BootNext variable before transferring control to the BootNext boot option"
If the grub can modify BootNext, if would be just ideal!
I also read, that grub has internal support for booting-once only
http://www.gnu.org/software/grub/manual/html_node/Booting-once_002donly.html#Booting-once_002donly
But it is not really clear how does it check if the kernel fails - my kernel just hangs or reboot the OS??? So, this option does not seem too secure. I need 100% garanty that the GRUB will try to load only once, and after that it will pass the loading to another OS
Thanks in advance!
Regards,
Georgy
Quoted 18 lines · George Buranov
Hello everybody.
<#inbox>
I got situation: I need to load linux kernel from grub, that can easily fail on some computers (even in production). I use grub to load this and the only this kernel.So, what I want to do is to load another OS loader, if grub (or more specificly my kernel) fails.
I know that UEFI supports this functionality (BootNext variable, UEFI Spec 3.1.2)
"The boot manager is also required to initiate a boot of the boot option specified by the BootNext variable as the first boot option on the next boot, and only on the next boot. The boot manager removes the BootNext variable before transferring control to the BootNext boot option"If the grub can modify BootNext, if would be just ideal!
Quoted 7 lines
I also read, that grub has internal support for booting-once only
http://www.gnu.org/software/grub/manual/html_node/Booting-once_002donly.html#Booting-once_002donlyBut it is not really clear how does it check if the kernel fails - my kernel just hangs or reboot the OS??? So, this option does not seem too secure. I need 100% garanty that the GRUB will try to load only once, and after that it will pass the loading to another OS
I implemented/fixed up the boot once support in redhat's grub 1. How I used it was to set a flag which was cleared when fully booted up. This was all protected with a hardware watchdog which I started in grub's stage 1 (though often you can get them started by the BIOS).
cheers,
Pádraig.