PXE-KEXEC(8)
pxe-kexec(8) β section 8 of the manual, bestie π the whole vibe is "PXE config, but make it kexec".
πΈ NAME πΈ
pxe-kexec β read a PXE configuration file and kexec entries into existence π¦
β¨ SYNOPSIS β¨
pxe-kexec [options] [tftp_server]
π DESCRIPTION π
π Overview π
So like, pxe-kexec is that girl: it fetches your PXE configuration from a TFTP server, reads that PXE configuration file, prompts you for a boot entry, downloads the kernel and initrd you picked, and finally tries to boot the kernel. Main character energy fr fr π
The normal process to boot with kexec(8) is that pxe-kexec loads the kernel and invokes reboot(8). Then the shutdown script of the Linux distribution executes kexec -e at the very end. The thing isβ¦ that is not implemented everywhere π. So pxe-kexec keeps a whitelist of Linux distributions that support reboot with kexec. If your distribution is not on that whitelist, the program just quits with a warning. To bypass that warning, please use the --igore-whitelist parameter. You can also use the --force parameter to execute kexec -e and immediately boot the selected kernel, without invoking shutdown(8)/reboot(8) at all.
pxe-kexec is meant to be used in an environment where pre-defined PXE configurations exist but the user wants to use kexec(8) instead of rebooting. Iconic, honestly.
Normally, the tftp_server must be specified as the first argument. If there's no TFTP server specified, pxe-kexec looks in the DHCP info file for the DHCP server and uses this one as TFTP server. This only works when the TFTP server is running on the same machine as the DHCP server. iykyk π§
==> Please also read the section called "Update Info" <== π
π¦ 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
- ARCH Linux
Don't hesitate to send the author an email to add your distribution to the whitelist π Please include the output of pxe-kexec --print-distribution 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 invokingreboot(8). This does not execute shutdown scripts, i.e. it 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 andkexec -eis also not executed.-w|--ignore-whitelistβ Don't check if the detected Linux distribution is on the whitelist of distributions that havekexec(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 π«Ά-llabel |--labellabel β Specifies the label that should be booted. Use that option if you already know which label you want to boot. This option implies--quiet.-i|--interfacenetif β Uses netif instead of the first (non-loopback and up) interface that is found. Example:eth5.-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 runningkexec -e. Instead, print the information which program would be executed with which arguments to standard error.-q|--quietβ Don't display the PXE messages that are added in the PXE configuration with thesaykeyword. Also don't display messages which PXE 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. slay π
-D|--debugβ Enable debugging output. That's good for finding (and fixing!) bugs. π-d|--nodeleteβ Keep downloaded files.-F|--ftpβ Always use FTP instead of TFTP. Useful for servers that share TFTP root and FTP root. (Passive) FTP has the advantage that it passes firewalls better than TFTP. π₯
π 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
-llabel 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-kexecnow 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 --ignore-whitelist.)
- To use the previous behaviour, i.e. just execute
kexec -einpxe-kexecat the end, you can still use the--forceparameter. Example:
% pxe-kexec mydhcp.mydomain.com
is now
% pxe-kexec --force mydhcp.mydomain.com
- If you want to have the old "dry-run" behaviour back, which in fact only missed the last
kexec -estep, you can use the option--load-only. 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 PXE configuration frommydhcp.mydomain.com, display thesaymessages from that configuration, prompt for an entry, letting the user confirm that entry and finally load that entry viakexec(8)and reboot viareboot(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 theSLES10-install-autolabel, 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 executekexec -eat the end instead of invokingreboot(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 runkexec -emanually at any time.
π AUTHOR π
The pxe-kexec program and documentation has been written by Bernhard Walle <bernhard@bwalle.de>. Respect the legend π«Ά
π BUGS π
This program has no bugs. If you find a feature that should be removed, please report to <bernhard@bwalle.de> if you don't want to create an account. Not me reading that twice π
π₯ SEE ALSO π₯
okay bestie that's the whole page, no cap β¨ this was version 0.2.4 from 2020-03-23, straight out of the PXE-Kexec section 8 manual. bye, go boot something ππ¦π
π¦ where this page comes from
- ubuntu jammy: pxe-kexec 0.2.4-3build3 Β· GPL-2.0-or-later
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms