Linux – does the second kernel need kexec enabled

kernelkexeclinux

It's clear that you need the kexec syscalls in the 'first' kernel. But does the kernel that should get loaded (with kexec_load and reboot) need to be compiled with kexec?

If yes, what extra code needs to get executed inside the kernel to do a kexec boot instead of a normal boot?

Best Answer

I haven't seen an explicit statement about that and I haven't given it a try but I guess this is not necessary. In addition to my guess the man pages says:

kexec performs the function of the boot loader from within the kernel.

An adaption of the kernel to be loaded would be necessary only if some black magic instead of the boot loader procedure was involved but not if the running kernel does the samle like the boot loader.

Related Question