forked from torvalds/linux
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
docs: kdump: convert docs to ReST and rename to *.rst
Convert kdump documentation to ReST and add it to the user faced manual, as the documents are mainly focused on sysadmins that would be enabling kdump. Note: the vmcoreinfo.rst has one very long title on one of its sub-sections: PG_lru|PG_private|PG_swapcache|PG_swapbacked|PG_slab|PG_hwpoision|PG_head_mask|PAGE_BUDDY_MAPCOUNT_VALUE(~PG_buddy)|PAGE_OFFLINE_MAPCOUNT_VALUE(~PG_offline) I opted to break this one, into two entries with the same content, in order to make it easier to display after being parsed in html and PDF. The conversion is actually: - add blank lines and identation in order to identify paragraphs; - fix tables markups; - add some lists markups; - mark literal blocks; - adjust title markups. At its new index.rst, let's add a :orphan: while this is not linked to the main index.rst file, in order to avoid build warnings. Signed-off-by: Mauro Carvalho Chehab <[email protected]> Signed-off-by: Jonathan Corbet <[email protected]>
- Loading branch information
Showing
12 changed files
with
137 additions
and
98 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
:orphan: | ||
|
||
================================================================ | ||
Documentation for Kdump - The kexec-based Crash Dumping Solution | ||
================================================================ | ||
|
||
This document includes overview, setup and installation, and analysis | ||
information. | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
kdump | ||
vmcoreinfo | ||
|
||
.. only:: subproject and html | ||
|
||
Indices | ||
======= | ||
|
||
* :ref:`genindex` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -71,35 +71,34 @@ This is a symlink to the latest version. | |
|
||
The latest kexec-tools git tree is available at: | ||
|
||
git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git | ||
and | ||
http://www.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git | ||
- git://git.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git | ||
- http://www.kernel.org/pub/scm/utils/kernel/kexec/kexec-tools.git | ||
|
||
There is also a gitweb interface available at | ||
http://www.kernel.org/git/?p=utils/kernel/kexec/kexec-tools.git | ||
|
||
More information about kexec-tools can be found at | ||
http://horms.net/projects/kexec/ | ||
|
||
3) Unpack the tarball with the tar command, as follows: | ||
3) Unpack the tarball with the tar command, as follows:: | ||
|
||
tar xvpzf kexec-tools.tar.gz | ||
tar xvpzf kexec-tools.tar.gz | ||
|
||
4) Change to the kexec-tools directory, as follows: | ||
4) Change to the kexec-tools directory, as follows:: | ||
|
||
cd kexec-tools-VERSION | ||
cd kexec-tools-VERSION | ||
|
||
5) Configure the package, as follows: | ||
5) Configure the package, as follows:: | ||
|
||
./configure | ||
./configure | ||
|
||
6) Compile the package, as follows: | ||
6) Compile the package, as follows:: | ||
|
||
make | ||
make | ||
|
||
7) Install the package, as follows: | ||
7) Install the package, as follows:: | ||
|
||
make install | ||
make install | ||
|
||
|
||
Build the system and dump-capture kernels | ||
|
@@ -126,25 +125,25 @@ dump-capture kernels for enabling kdump support. | |
System kernel config options | ||
---------------------------- | ||
|
||
1) Enable "kexec system call" in "Processor type and features." | ||
1) Enable "kexec system call" in "Processor type and features.":: | ||
|
||
CONFIG_KEXEC=y | ||
CONFIG_KEXEC=y | ||
|
||
2) Enable "sysfs file system support" in "Filesystem" -> "Pseudo | ||
filesystems." This is usually enabled by default. | ||
filesystems." This is usually enabled by default:: | ||
|
||
CONFIG_SYSFS=y | ||
CONFIG_SYSFS=y | ||
|
||
Note that "sysfs file system support" might not appear in the "Pseudo | ||
filesystems" menu if "Configure standard kernel features (for small | ||
systems)" is not enabled in "General Setup." In this case, check the | ||
.config file itself to ensure that sysfs is turned on, as follows: | ||
.config file itself to ensure that sysfs is turned on, as follows:: | ||
|
||
grep 'CONFIG_SYSFS' .config | ||
grep 'CONFIG_SYSFS' .config | ||
|
||
3) Enable "Compile the kernel with debug info" in "Kernel hacking." | ||
3) Enable "Compile the kernel with debug info" in "Kernel hacking.":: | ||
|
||
CONFIG_DEBUG_INFO=Y | ||
CONFIG_DEBUG_INFO=Y | ||
|
||
This causes the kernel to be built with debug symbols. The dump | ||
analysis tools require a vmlinux with debug symbols in order to read | ||
|
@@ -154,39 +153,42 @@ Dump-capture kernel config options (Arch Independent) | |
----------------------------------------------------- | ||
|
||
1) Enable "kernel crash dumps" support under "Processor type and | ||
features": | ||
features":: | ||
|
||
CONFIG_CRASH_DUMP=y | ||
CONFIG_CRASH_DUMP=y | ||
|
||
2) Enable "/proc/vmcore support" under "Filesystems" -> "Pseudo filesystems". | ||
2) Enable "/proc/vmcore support" under "Filesystems" -> "Pseudo filesystems":: | ||
|
||
CONFIG_PROC_VMCORE=y | ||
|
||
CONFIG_PROC_VMCORE=y | ||
(CONFIG_PROC_VMCORE is set by default when CONFIG_CRASH_DUMP is selected.) | ||
|
||
Dump-capture kernel config options (Arch Dependent, i386 and x86_64) | ||
-------------------------------------------------------------------- | ||
|
||
1) On i386, enable high memory support under "Processor type and | ||
features": | ||
features":: | ||
|
||
CONFIG_HIGHMEM64G=y | ||
|
||
or:: | ||
|
||
CONFIG_HIGHMEM64G=y | ||
or | ||
CONFIG_HIGHMEM4G | ||
CONFIG_HIGHMEM4G | ||
|
||
2) On i386 and x86_64, disable symmetric multi-processing support | ||
under "Processor type and features": | ||
under "Processor type and features":: | ||
|
||
CONFIG_SMP=n | ||
CONFIG_SMP=n | ||
|
||
(If CONFIG_SMP=y, then specify maxcpus=1 on the kernel command line | ||
when loading the dump-capture kernel, see section "Load the Dump-capture | ||
Kernel".) | ||
|
||
3) If one wants to build and use a relocatable kernel, | ||
Enable "Build a relocatable kernel" support under "Processor type and | ||
features" | ||
features":: | ||
|
||
CONFIG_RELOCATABLE=y | ||
CONFIG_RELOCATABLE=y | ||
|
||
4) Use a suitable value for "Physical address where the kernel is | ||
loaded" (under "Processor type and features"). This only appears when | ||
|
@@ -211,13 +213,13 @@ Dump-capture kernel config options (Arch Dependent, i386 and x86_64) | |
Dump-capture kernel config options (Arch Dependent, ppc64) | ||
---------------------------------------------------------- | ||
|
||
1) Enable "Build a kdump crash kernel" support under "Kernel" options: | ||
1) Enable "Build a kdump crash kernel" support under "Kernel" options:: | ||
|
||
CONFIG_CRASH_DUMP=y | ||
CONFIG_CRASH_DUMP=y | ||
|
||
2) Enable "Build a relocatable kernel" support | ||
2) Enable "Build a relocatable kernel" support:: | ||
|
||
CONFIG_RELOCATABLE=y | ||
CONFIG_RELOCATABLE=y | ||
|
||
Make and install the kernel and its modules. | ||
|
||
|
@@ -231,11 +233,13 @@ Dump-capture kernel config options (Arch Dependent, ia64) | |
|
||
The crashkernel region can be automatically placed by the system | ||
kernel at run time. This is done by specifying the base address as 0, | ||
or omitting it all together. | ||
or omitting it all together:: | ||
|
||
crashkernel=256M@0 | ||
or | ||
crashkernel=256M | ||
crashkernel=256M@0 | ||
|
||
or:: | ||
|
||
crashkernel=256M | ||
|
||
If the start address is specified, note that the start address of the | ||
kernel will be aligned to 64Mb, so if the start address is not then | ||
|
@@ -245,9 +249,9 @@ Dump-capture kernel config options (Arch Dependent, arm) | |
---------------------------------------------------------- | ||
|
||
- To use a relocatable kernel, | ||
Enable "AUTO_ZRELADDR" support under "Boot" options: | ||
Enable "AUTO_ZRELADDR" support under "Boot" options:: | ||
|
||
AUTO_ZRELADDR=y | ||
AUTO_ZRELADDR=y | ||
|
||
Dump-capture kernel config options (Arch Dependent, arm64) | ||
---------------------------------------------------------- | ||
|
@@ -265,12 +269,12 @@ on the value of System RAM -- that's mostly for distributors that pre-setup | |
the kernel command line to avoid a unbootable system after some memory has | ||
been removed from the machine. | ||
|
||
The syntax is: | ||
The syntax is:: | ||
|
||
crashkernel=<range1>:<size1>[,<range2>:<size2>,...][@offset] | ||
range=start-[end] | ||
|
||
For example: | ||
For example:: | ||
|
||
crashkernel=512M-2G:64M,2G-:128M | ||
|
||
|
@@ -326,43 +330,54 @@ can choose to load the uncompressed vmlinux or compressed bzImage/vmlinuz | |
of dump-capture kernel. Following is the summary. | ||
|
||
For i386 and x86_64: | ||
|
||
- Use vmlinux if kernel is not relocatable. | ||
- Use bzImage/vmlinuz if kernel is relocatable. | ||
|
||
For ppc64: | ||
|
||
- Use vmlinux | ||
|
||
For ia64: | ||
|
||
- Use vmlinux or vmlinuz.gz | ||
|
||
For s390x: | ||
|
||
- Use image or bzImage | ||
|
||
For arm: | ||
|
||
- Use zImage | ||
|
||
For arm64: | ||
|
||
- Use vmlinux or Image | ||
|
||
If you are using an uncompressed vmlinux image then use following command | ||
to load dump-capture kernel. | ||
to load dump-capture kernel:: | ||
|
||
kexec -p <dump-capture-kernel-vmlinux-image> \ | ||
--initrd=<initrd-for-dump-capture-kernel> --args-linux \ | ||
--append="root=<root-dev> <arch-specific-options>" | ||
|
||
If you are using a compressed bzImage/vmlinuz, then use following command | ||
to load dump-capture kernel. | ||
to load dump-capture kernel:: | ||
|
||
kexec -p <dump-capture-kernel-bzImage> \ | ||
--initrd=<initrd-for-dump-capture-kernel> \ | ||
--append="root=<root-dev> <arch-specific-options>" | ||
|
||
If you are using a compressed zImage, then use following command | ||
to load dump-capture kernel. | ||
to load dump-capture kernel:: | ||
|
||
kexec --type zImage -p <dump-capture-kernel-bzImage> \ | ||
--initrd=<initrd-for-dump-capture-kernel> \ | ||
--dtb=<dtb-for-dump-capture-kernel> \ | ||
--append="root=<root-dev> <arch-specific-options>" | ||
|
||
If you are using an uncompressed Image, then use following command | ||
to load dump-capture kernel. | ||
to load dump-capture kernel:: | ||
|
||
kexec -p <dump-capture-kernel-Image> \ | ||
--initrd=<initrd-for-dump-capture-kernel> \ | ||
|
@@ -376,18 +391,23 @@ Following are the arch specific command line options to be used while | |
loading dump-capture kernel. | ||
|
||
For i386, x86_64 and ia64: | ||
|
||
"1 irqpoll maxcpus=1 reset_devices" | ||
|
||
For ppc64: | ||
|
||
"1 maxcpus=1 noirqdistrib reset_devices" | ||
|
||
For s390x: | ||
|
||
"1 maxcpus=1 cgroup_disable=memory" | ||
|
||
For arm: | ||
|
||
"1 maxcpus=1 reset_devices" | ||
|
||
For arm64: | ||
|
||
"1 maxcpus=1 reset_devices" | ||
|
||
Notes on loading the dump-capture kernel: | ||
|
@@ -464,7 +484,7 @@ Write Out the Dump File | |
======================= | ||
|
||
After the dump-capture kernel is booted, write out the dump file with | ||
the following command: | ||
the following command:: | ||
|
||
cp /proc/vmcore <dump-file> | ||
|
||
|
@@ -476,7 +496,7 @@ Before analyzing the dump image, you should reboot into a stable kernel. | |
|
||
You can do limited analysis using GDB on the dump file copied out of | ||
/proc/vmcore. Use the debug vmlinux built with -g and run the following | ||
command: | ||
command:: | ||
|
||
gdb vmlinux <dump-file> | ||
|
||
|
@@ -504,6 +524,11 @@ to achieve the same behaviour. | |
Contact | ||
======= | ||
|
||
Vivek Goyal ([email protected]) | ||
Maneesh Soni ([email protected]) | ||
- Vivek Goyal ([email protected]) | ||
- Maneesh Soni ([email protected]) | ||
|
||
GDB macros | ||
========== | ||
|
||
.. include:: gdbmacros.txt | ||
:literal: |
Oops, something went wrong.