is a system call that enables you to load and boot into another
kernel from the currently running kernel.
performs the function of the boot loader from within the kernel. The
primary difference between a standard system boot and a
boot is that the hardware initialization normally performed by the BIOS
or firmware (depending on architecture) is not performed during a
boot. This has the effect of reducing the time required for a reboot.
Make sure you have selected
when configuring the kernel. The
option enables the
(1) loading the kernel to be rebooted to into memory, and
is the kernel file that you intend to reboot to.
Insert the command-line parameters that must be passed to the new
Passing the exact contents of /proc/cmdline into
is the safest way to ensure that correct values are passed to the
is the initrd image to be used during boot.
It's also possible to invoke
without an option parameter. In that case, kexec loads the specified
kernel and then invokes
If the shutdown scripts of your Linux distribution support
kexec-based rebooting, they then call
just before actually rebooting the machine. That way, the machine does
a clean shutdown including all shutdown scripts.
For example, if the kernel image you want to reboot to is
the contents of /proc/cmdline is
and the path to the initrd is
then you would use the following command to load the kernel: