kexec and Grub

John Moser john.r.moser at gmail.com
Tue Feb 5 21:58:41 UTC 2013


On Tue, Feb 5, 2013 at 4:44 PM, Felix Miata <mrmazda at earthlink.net> wrote:
> On 2013-02-05 16:07 (GMT-0500) John Moser composed:
>
>
>> Has anyone gotten Grub2 to load via Linux Kexec?  It used to be
>> possible to kexec grub.exe for some reason.
>
>
> This question makes me think either you haven't read the kexec man page, or
> one of misunderstands it. Why need any bootloader be involved with kexec
> usage?

Oh I understand it.  Just jumping straight to the bootloader is a
desirable use case.

Also covered in my message, you are less error prone going through the
bootloader.  Consider these two possible paths to solve the above
problem:

SOLUTION A:

 - Write yourself a Grub parser (maybe even something that runs grub
itself and gets it to spit out a list of boot options, a select boot
option, or the default boot option)

- Parse the data you get into viable arguments to pass to kexec for
loading the kernel, initrd, setting parameters, etc.

- Shut down the system to a halt state and call kexec as your
termination (halt, reboot, etc) command.


SOLUTION B:

 - Load Grub into kexec

 - Shut down the system into a halt state and call kexec as your
termination (halt, reboot, etc) command


Which of these looks easier?




More information about the Ubuntu-devel-discuss mailing list