SYNOPSIS

pxe-kexec [options] [tftp_server]

DESCRIPTION

Overview

pxe-kexec is a tool that fetches \s-1PXE\s0 configuration from a \s-1TFTP\s0 server, reads that \s-1PXE\s0 configuration file, prompts the user for an boot entry, downloads the specified kernel and initrd and finally tries to boot the kernel.

The normal process to boot with kexec\|(8) is that pxe-kexec loads the kernel and invokes reboot\|(8). The shutdown script of the Linux distribution then executes \*(L"kexec -e\*(R" at the very end. That is not implemented everywhere. Therefore, pxe-kexec has a whitelist of Linux distributions that support reboot with kexec. If the distribution is not on that whitelist, the program quits with a warning. To bypass that warning, please use the \*(L"--igore-whitelist\*(R" parameter. You can also use the \*(L"--force\*(R" parameter to execute \*(L"kexec -e\*(R" to immediately boot the selected kernel, without invoking shutdown\|(8)/reboot\|(8).

pxe-kexec meant to be used in an environment where pre-defined \s-1PXE\s0 configurations exist but the user wants to use kexec\|(8) instead of rebooting.

Normally, the tftp_server must be specified as first argument. If there's no \s-1TFTP\s0 server specified, pxe-kexec looks in the \s-1DHCP\s0 info file for the \s-1DHCP\s0 server and uses this one as \s-1TFTP\s0 server. This only works when the \s-1TFTP\s0 server is running on the same machine as the \s-1DHCP\s0 server.

==> Please also read the section called \*(L"Update Info\*(R" <==

Whitelist

As mentioned previously, a whitelist of Linux distributions that support kexec-based rebooting is maintained. Currently following distributions are on the whitelist:

  • openSUSE, starting with version 11.0

  • Ubuntu, starting with version 9.04

  • Red Hat Enterprise Linux and CentOS, starting with version 5.3

  • Fedora Linux, starting with version 11

  • \s-1ARCH\s0 Linux

Don't hesitate to send the author an email to add the distribution to the whitelist. Please include the output of \*(L"pxe-kexec --print-distribution\*(R" in that mail.

OPTIONS

Following options can be specified:

-h | --help

Prints a short help.

-v | --version

Prints the version number to standard output.

-f | --force

Immediately load the kernel without invoking reboot\|(8). This does not execute shutdown scripts, i.e. does not terminate daemons, network connections etc.

-L | --load-only

When that option is specified, the new kernel is only loaded. No reboot is triggered and \*(L"kexec -e\*(R" is also not executed.

-w | --ignore-whitelist

Don't check if the detected Linux distribution is on the whitelist of distributions that have kexec\|(8) in their shutdown script. Please don't use that parameter without letting the author know which distribution you use and how to detect that distribution. Then the distribution can be added to the whitelist and other users profit from that experience.

-l label | --label label

Specifies the label that should be booted. Use that option if you already know which label you want to boot. This option implies \*(L"--quiet\*(R".

-i | --interface netif

Uses netif instead of the first (non-loopback and up) interface that is found. Example: \*(L"eth5\*(R".

-n | --noconfirm

Don't ask the user for confirmation before booting an entry. Use that option with care!

-Y | --dry-run

Don't execute call to kexec and don't switch the virtual console before running \*(L"kexec -e\*(R". Instead, print the information which program would be executed with which arguments to standard error.

-q | --quiet

Don't display the \s-1PXE\s0 messages that are added in the \s-1PXE\s0 configuration with the say keyword. Also don't display messages which \s-1PXE\s0 configuration files the downloader tries to fetch.

-p | --print-distribution

Only prints the detected Linux distribution and exits. For example:

    Type        : Ubuntu
    Name        : Ubuntu
    Release     : 9.04
    Codename    : jaunty
    Description : Ubuntu 9.04

This option is very useful if your distribution is not on the whitelist of Linux distributions that support kexec\|(8) in the reboot scripts and you want to create a bugreport. This command does not require root privileges.

-D | --debug

Enable debugging output. That's good for finding (and fixing!) bugs.

-d | --nodelete

Keep downloaded files.

-F | --ftp

Always use \s-1FTP\s0 instead of \s-1TFTP\s0. Useful for servers that share \s-1TFTP\s0 root and \s-1FTP\s0 root. (Passive) \s-1FTP\s0 has the advantage that it passes firewalls better than \s-1TFTP\s0.

UPDATE INFO

Updating from 0.1.x to 0.2

Compared to version 0.1.x, the syntax has changed:

  • The default label must now be set with the -l label option instead of the 2nd argument. Example: % pxe-kexec mydhcp.mydomain.com SLES10-install-auto is now % pxe-kexec -l SLES10-install-auto mydhcp.mydomain.com

  • pxe-kexec now uses the reboot mechanism by default: The kernel is loaded, then the reboot is triggered and the reboot script of the Linux distribution finally boots the kernel. This has the advantage of a clear shutdown. The program keeps a database of Linux distributions that support kexec-based reboot. If the currently active distribution is not on the whitelist, an error is printed. (That whitelist can be ignored with \*(L"--ignore-whitelist\*(R".)

  • To use the previous behaviour, i.e. just execute \*(L"kexec -e\*(R" in pxe-kexec at the end, you can still use the \*(L"--force\*(R" parameter. Example: % pxe-kexec mydhcp.mydomain.com is now % pxe-kexec --force mydhcp.mydomain.com

  • If you want to have the old \*(L"dry-run\*(R" behaviour back, which in fact only missed the last \*(L"kexec -e\*(R" step, you can use the option \*(L"--load-only\*(R". Example: % pxe-kexec --dry-run mydhcp.mydomain.com is now % pxe-kexec --load-only mydhcp.mydomain.com

EXAMPLES

pxe-kexec mydhcp.mydomain.com

Try to fetch the \s-1PXE\s0 configuration from mydhcp.mydomain.com, display the say messages from that configuration, prompt for an entry, letting the user confirm that entry and finally load that entry via kexec\|(8) and reboot via reboot\|(8). This only works if you distribution supports kexec-based rebooting, i.e. it is in the internal whitelist.

pxe-kexec -n mydhcp.mydomain.com

Same as the previous example, but omit the final confirmation step.

pxe-kexec -l SLES10-install-auto mydhcp.mydomain.com

Same as the first example, but don't prompt the user for the label to boot. Directly boot the SLES10-install-auto label, but letting the user confirm that he really wants to boot this!

pxe-kexec -n -l SLES10-install-auto mydhcp.mydomain.com

Same as the previous example, but without confirmation.

pxe-kexec -f mydhcp.mydomain.com

Same as the first example, but execute \*(L"kexec -e\*(R" at the end instead of invoking reboot\|(8).

pxe-kexec -l mydhcp.mydomain.com

Same as the first example, but don't trigger a reboot. Instead, the kernel is just loaded. If your distribution supports kexec-based rebooting, the kernel will be loaded on next reboot. You can also run \*(L"kexec -e\*(R" manually at any time.

AUTHOR

The pxe-kexec program and documentation has been written by Bernhard Walle <[email protected]>.

BUGS

This program has no bugs. If you find a feature that should be removed, please report to <[email protected]> if you don't want to create an account.

RELATED TO pxe-kexec…

kexec\|(8)