Kexec

From Gentoo Linux Wiki
Jump to: navigation, search

Contents

[edit] What is kexec?

Kexec lets you reboot faster, skipping hardware initialization by BIOS POST / firmware, and bootloader.

Kexec shutdowns your current kernel, and starts another. It is like a reboot but it is independent of the system firmware. And like a reboot you can start any kernel with it, not just Linux.

[edit] What you need

[edit] Getting necessary package

emerge -av kexec-tools

[edit] Kernel configuration

Gentoo.png
Gentoo has an official article on:

You will need to have kexec support enabled:

Linux Kernel Configuration: >=kernel-sources-2.6.13
Processor type and features --->
 [*] kexec system call (EXPERIMENTAL)

[edit] Configuring kexec

Configuration is done in /etc/conf.d/kexec. That file is self-documenting. =)

[edit] Usage

In Gentoo, Kexec is executed when you reboot, by reboot command or pressing Ctrl+Alt+Del.

If you want to use kexec once, just run

/etc/init.d/kexec start

It'll reserve kexec call at reboot. Later on, you can reboot anytime, letting kexec starts another (or the same) kernel.

If you want kexec to be run every time you reboot, add it to a runlevel:

rc-update add kexec <runlevel>

If you want to reboot the normal way this time, do:

/etc/init.d/kexec stop

[edit] See also

Personal tools
In other languages