I find kexec very useful to speed-up the reboot of Linux servers.
One parameter into /etc/default/kexec
is USE_GRUB_CONFIG
.
This parameter is meant to "read Grub configuration file". But I don't understand what governs the choice between setting it to true or false.
What I understand: in Debian, the /etc/init.d/kexec-load
file contains the code used to reboot with kexec. When USE_GRUB_CONFIG
is set to true, then the Grub configuration file is read and its parameters are used to reboot.
If USE_GRUB_CONFIG
is set to false, then the current kernel is reloaded with its current parameters.
So USE_GRUB_CONFIG
set to true always reboot with the "normal" kernel.
And USE_GRUB_CONFIG
set to false always reboot without changing anything, ignoring whatever could be done to Grub.
Then I deduce I should set it to true in order to take advantage of updates into Grub config.
So why is the default value false? Am I wrong somewhere, or do most admins prefer to slow-boot with special parameters then fast-reboot with them?
Best Answer
With the default "false" the init script uses the kernel image und initrd from
/etc/default/kexec
. That is usually/vmlinuz
and/initrd.img
- normally the last installed kernel.When you set to "true", it is parsing the
/boot/grub/grub.cfg
file to find the default kernel image and initrd. Mostly that is the same. When you configure your grub to use a other kernel as default (e.g. a older one) kexec cannot recognise that except you set the option to "true".