Manual Pages for Linux CentOS command on man kexec_load
MyWebUniversity

Manual Pages for Linux CentOS command on man kexec_load

KEXECLOAD(2) Linux Programmer's Manual KEXECLOAD(2)

NAME

kexecload - load a new kernel for later execution SYNOPSIS

#include long kexecload(unsigned long entry, unsigned long nrsegments, struct kexecsegment *segments, unsigned long flags); Note: There is no glibc wrapper for this system call; see NOTES. DESCRIPTION The kexecload() system call loads a new kernel that can be executed later by reboot(2).

The flags argument is a mask whose high-order bits control the opera‐ tion of the call. The following values can be specified in flags: KEXECONCRASH (since Linux 2.6.13) Execute the new kernel automatically on a system crash. KEXECPRESERVECONTEXT (since Linux 2.6.27) Preserve the system hardware and software states before execut‐ ing the new kernel. This could be used for system suspend. This flag is available only if the kernel was configured with CONFIGKEXECJUMP, and is effective only if nrsegments is greater than 0.

The low-order bits of flags contain the architecture of the to-be-exe‐ cuted kernel. Specify (OR) the constant KEXECARCHDEFAULT to use the current architecture, or one of the following architecture constants KEXECARCH386, KEXECARCHX8664, KEXECARCHPPC, KEXECARCHPPC64, KEXECARCHIA64, KEXECARCHARM, KEXECARCHS390, KEXECARCHSH, KEXECARCHMIPS, and KEXECARCHMIPSLE. The architecture must be exe‐ cutable on the CPU of the system. The entry argument is the physical entry address in the kernel image. The nrsegments argument is the number of segments pointed to by the segments pointer. The segments argument is an array of kexecsegment structures which define the kernel layout: struct kexecsegment { void *buf; /* Buffer in user space */ sizet bufsz; /* Buffer length in user space */ void *mem; /* Physical address of kernel */ sizet memsz; /* Physical address length */ }; The kernel image defined by segments is copied from the calling process into previously reserved memory. RETURN VALUE

On success, kexecload() returns 0. On error, -1 is returned and errno is set to indicate the error. ERRORS EBUSY Another crash kernel is already being loaded or a crash kernel is already in use. EINVAL flags is invalid; or nrsegments is too large EPERM The caller does not have the CAPSYSBOOT capability. VERSIONS The kexecload() system call first appeared in Linux 2.6.13. CONFORMING TO

This system call is Linux-specific. NOTES Currently, there is no glibc support for kexecload(). Call it using syscall(2). The required constants are in the Linux kernel source file linux/kexec.h, which is not currently exported to glibc. Therefore, these constants must be defined manually. This system call is available only if the kernel was configured with CONFIGKEXEC. SEE ALSO reboot(2), syscall(2) COLOPHON

This page is part of release 3.53 of the Linux man-pages project. A description of the project, and information about reporting bugs, can

be found at http://www.kernel.org/doc/man-pages/.

Linux 2012-07-13 KEXECLOAD(2)




Contact us      |      About us      |      Term of use      |       Copyright © 2000-2019 MyWebUniversity.com ™