aboutsummaryrefslogtreecommitdiffstats
path: root/Documentation/kdump
diff options
context:
space:
mode:
authorVivek Goyal <vgoyal@in.ibm.com>2007-01-11 02:15:35 -0500
committerLinus Torvalds <torvalds@woody.osdl.org>2007-01-11 21:18:20 -0500
commit9c61a446a1cab4280404798e335655266c1a4929 (patch)
treef117130c9f6163627b9318b4cfc08b899dc78420 /Documentation/kdump
parentb282b6f8a8d1cf3e132ce3769d7d1cac81d9dd2d (diff)
[PATCH] Kdump documentation update
o Kdump documentation update. - Update details for using relocatable kernel. - Start using kexec-tools-testing release as it is latest and old kexec-tools can't load relocatable bzImage file. - Also add kdump on ia64 specific details. Signed-off-by: Vivek Goyal <vgoyal@in.ibm.com> Cc: Horms <horms@verge.net.au> Cc: Mohan Kumar M <mohan@in.ibm.com> Signed-off-by: Andrew Morton <akpm@osdl.org> Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'Documentation/kdump')
-rw-r--r--Documentation/kdump/kdump.txt224
1 files changed, 152 insertions, 72 deletions
diff --git a/Documentation/kdump/kdump.txt b/Documentation/kdump/kdump.txt
index 99f2d4d4bf7d..5af6676a88f0 100644
--- a/Documentation/kdump/kdump.txt
+++ b/Documentation/kdump/kdump.txt
@@ -17,7 +17,7 @@ You can use common Linux commands, such as cp and scp, to copy the
17memory image to a dump file on the local disk, or across the network to 17memory image to a dump file on the local disk, or across the network to
18a remote system. 18a remote system.
19 19
20Kdump and kexec are currently supported on the x86, x86_64, and ppc64 20Kdump and kexec are currently supported on the x86, x86_64, ppc64 and IA64
21architectures. 21architectures.
22 22
23When the system kernel boots, it reserves a small section of memory for 23When the system kernel boots, it reserves a small section of memory for
@@ -54,59 +54,64 @@ memory," in two ways:
54Setup and Installation 54Setup and Installation
55====================== 55======================
56 56
57Install kexec-tools and the Kdump patch 57Install kexec-tools
58--------------------------------------- 58-------------------
59 59
601) Login as the root user. 601) Login as the root user.
61 61
622) Download the kexec-tools user-space package from the following URL: 622) Download the kexec-tools user-space package from the following URL:
63 63
64 http://www.xmission.com/~ebiederm/files/kexec/kexec-tools-1.101.tar.gz 64http://www.kernel.org/pub/linux/kernel/people/horms/kexec-tools/kexec-tools-testing-20061214.tar.gz
65 65
663) Unpack the tarball with the tar command, as follows: 66Note: Latest kexec-tools-testing git tree is available at
67
68 tar xvpzf kexec-tools-1.101.tar.gz
69
704) Download the latest consolidated Kdump patch from the following URL:
71
72 http://lse.sourceforge.net/kdump/
73 67
74 (This location is being used until all the user-space Kdump patches 68git://git.kernel.org/pub/scm/linux/kernel/git/horms/kexec-tools-testing.git
75 are integrated with the kexec-tools package.) 69or
70http://www.kernel.org/git/?p=linux/kernel/git/horms/kexec-tools-testing.git;a=summary
76 71
775) Change to the kexec-tools-1.101 directory, as follows: 723) Unpack the tarball with the tar command, as follows:
78 73
79 cd kexec-tools-1.101 74 tar xvpzf kexec-tools-testing-20061214.tar.gz
80 75
816) Apply the consolidated patch to the kexec-tools-1.101 source tree 764) Change to the kexec-tools-1.101 directory, as follows:
82 with the patch command, as follows. (Modify the path to the downloaded
83 patch as necessary.)
84 77
85 patch -p1 < /path-to-kdump-patch/kexec-tools-1.101-kdump.patch 78 cd kexec-tools-testing-20061214
86 79
877) Configure the package, as follows: 805) Configure the package, as follows:
88 81
89 ./configure 82 ./configure
90 83
918) Compile the package, as follows: 846) Compile the package, as follows:
92 85
93 make 86 make
94 87
959) Install the package, as follows: 887) Install the package, as follows:
96 89
97 make install 90 make install
98 91
99 92
100Download and build the system and dump-capture kernels 93Build the system and dump-capture kernels
101------------------------------------------------------ 94-----------------------------------------
95There are two possible methods of using Kdump.
96
971) Build a separate custom dump-capture kernel for capturing the
98 kernel core dump.
99
1002) Or use the system kernel binary itself as dump-capture kernel and there is
101 no need to build a separate dump-capture kernel. This is possible
102 only with the architecutres which support a relocatable kernel. As
103 of today i386 and ia64 architectures support relocatable kernel.
104
105Building a relocatable kernel is advantageous from the point of view that
106one does not have to build a second kernel for capturing the dump. But
107at the same time one might want to build a custom dump capture kernel
108suitable to his needs.
102 109
103Download the mainline (vanilla) kernel source code (2.6.13-rc1 or newer) 110Following are the configuration setting required for system and
104from http://www.kernel.org. Two kernels must be built: a system kernel 111dump-capture kernels for enabling kdump support.
105and a dump-capture kernel. Use the following steps to configure these
106kernels with the necessary kexec and Kdump features:
107 112
108System kernel 113System kernel config options
109------------- 114----------------------------
110 115
1111) Enable "kexec system call" in "Processor type and features." 1161) Enable "kexec system call" in "Processor type and features."
112 117
@@ -132,88 +137,160 @@ System kernel
132 analysis tools require a vmlinux with debug symbols in order to read 137 analysis tools require a vmlinux with debug symbols in order to read
133 and analyze a dump file. 138 and analyze a dump file.
134 139
1354) Make and install the kernel and its modules. Update the boot loader 140Dump-capture kernel config options (Arch Independent)
136 (such as grub, yaboot, or lilo) configuration files as necessary. 141-----------------------------------------------------
137
1385) Boot the system kernel with the boot parameter "crashkernel=Y@X",
139 where Y specifies how much memory to reserve for the dump-capture kernel
140 and X specifies the beginning of this reserved memory. For example,
141 "crashkernel=64M@16M" tells the system kernel to reserve 64 MB of memory
142 starting at physical address 0x01000000 for the dump-capture kernel.
143
144 On x86 and x86_64, use "crashkernel=64M@16M".
145 142
146 On ppc64, use "crashkernel=128M@32M". 1431) Enable "kernel crash dumps" support under "Processor type and
144 features":
147 145
146 CONFIG_CRASH_DUMP=y
148 147
149The dump-capture kernel 1482) Enable "/proc/vmcore support" under "Filesystems" -> "Pseudo filesystems".
150-----------------------
151 149
1521) Under "General setup," append "-kdump" to the current string in 150 CONFIG_PROC_VMCORE=y
153 "Local version." 151 (CONFIG_PROC_VMCORE is set by default when CONFIG_CRASH_DUMP is selected.)
154 152
1552) On x86, enable high memory support under "Processor type and 153Dump-capture kernel config options (Arch Dependent, i386)
154--------------------------------------------------------
1551) On x86, enable high memory support under "Processor type and
156 features": 156 features":
157 157
158 CONFIG_HIGHMEM64G=y 158 CONFIG_HIGHMEM64G=y
159 or 159 or
160 CONFIG_HIGHMEM4G 160 CONFIG_HIGHMEM4G
161 161
1623) On x86 and x86_64, disable symmetric multi-processing support 1622) On x86 and x86_64, disable symmetric multi-processing support
163 under "Processor type and features": 163 under "Processor type and features":
164 164
165 CONFIG_SMP=n 165 CONFIG_SMP=n
166
166 (If CONFIG_SMP=y, then specify maxcpus=1 on the kernel command line 167 (If CONFIG_SMP=y, then specify maxcpus=1 on the kernel command line
167 when loading the dump-capture kernel, see section "Load the Dump-capture 168 when loading the dump-capture kernel, see section "Load the Dump-capture
168 Kernel".) 169 Kernel".)
169 170
1704) On ppc64, disable NUMA support and enable EMBEDDED support: 1713) If one wants to build and use a relocatable kernel,
172 Enable "Build a relocatable kernel" support under "Processor type and
173 features"
171 174
172 CONFIG_NUMA=n 175 CONFIG_RELOCATABLE=y
173 CONFIG_EMBEDDED=y
174 CONFIG_EEH=N for the dump-capture kernel
175 176
1765) Enable "kernel crash dumps" support under "Processor type and 1774) Use a suitable value for "Physical address where the kernel is
177 features": 178 loaded" (under "Processor type and features"). This only appears when
179 "kernel crash dumps" is enabled. A suitable value depends upon
180 whether kernel is relocatable or not.
181
182 If you are using a relocatable kernel use CONFIG_PHYSICAL_START=0x100000
183 This will compile the kernel for physical address 1MB, but given the fact
184 kernel is relocatable, it can be run from any physical address hence
185 kexec boot loader will load it in memory region reserved for dump-capture
186 kernel.
187
188 Otherwise it should be the start of memory region reserved for
189 second kernel using boot parameter "crashkernel=Y@X". Here X is
190 start of memory region reserved for dump-capture kernel.
191 Generally X is 16MB (0x1000000). So you can set
192 CONFIG_PHYSICAL_START=0x1000000
193
1945) Make and install the kernel and its modules. DO NOT add this kernel
195 to the boot loader configuration files.
178 196
179 CONFIG_CRASH_DUMP=y 197Dump-capture kernel config options (Arch Dependent, x86_64)
198----------------------------------------------------------
1991) On x86 and x86_64, disable symmetric multi-processing support
200 under "Processor type and features":
201
202 CONFIG_SMP=n
203
204 (If CONFIG_SMP=y, then specify maxcpus=1 on the kernel command line
205 when loading the dump-capture kernel, see section "Load the Dump-capture
206 Kernel".)
180 207
1816) Use a suitable value for "Physical address where the kernel is 2082) Use a suitable value for "Physical address where the kernel is
182 loaded" (under "Processor type and features"). This only appears when 209 loaded" (under "Processor type and features"). This only appears when
183 "kernel crash dumps" is enabled. By default this value is 0x1000000 210 "kernel crash dumps" is enabled. By default this value is 0x1000000
184 (16MB). It should be the same as X in the "crashkernel=Y@X" boot 211 (16MB). It should be the same as X in the "crashkernel=Y@X" boot
185 parameter discussed above. 212 parameter.
186 213
187 On x86 and x86_64, use "CONFIG_PHYSICAL_START=0x1000000". 214 For x86_64, normally "CONFIG_PHYSICAL_START=0x1000000".
188 215
189 On ppc64 the value is automatically set at 32MB when 2163) Make and install the kernel and its modules. DO NOT add this kernel
190 CONFIG_CRASH_DUMP is set. 217 to the boot loader configuration files.
191
1926) Optionally enable "/proc/vmcore support" under "Filesystems" ->
193 "Pseudo filesystems".
194 218
195 CONFIG_PROC_VMCORE=y 219Dump-capture kernel config options (Arch Dependent, ppc64)
196 (CONFIG_PROC_VMCORE is set by default when CONFIG_CRASH_DUMP is selected.) 220----------------------------------------------------------
197 221
1987) Make and install the kernel and its modules. DO NOT add this kernel 222- Make and install the kernel and its modules. DO NOT add this kernel
199 to the boot loader configuration files. 223 to the boot loader configuration files.
200 224
225Dump-capture kernel config options (Arch Dependent, ia64)
226----------------------------------------------------------
227(To be filled)
228
229
230Boot into System Kernel
231=======================
232
2331) Make and install the kernel and its modules. Update the boot loader
234 (such as grub, yaboot, or lilo) configuration files as necessary.
235
2362) Boot the system kernel with the boot parameter "crashkernel=Y@X",
237 where Y specifies how much memory to reserve for the dump-capture kernel
238 and X specifies the beginning of this reserved memory. For example,
239 "crashkernel=64M@16M" tells the system kernel to reserve 64 MB of memory
240 starting at physical address 0x01000000 (16MB) for the dump-capture kernel.
241
242 On x86 and x86_64, use "crashkernel=64M@16M".
243
244 On ppc64, use "crashkernel=128M@32M".
201 245
202Load the Dump-capture Kernel 246Load the Dump-capture Kernel
203============================ 247============================
204 248
205After booting to the system kernel, load the dump-capture kernel using 249After booting to the system kernel, dump-capture kernel needs to be
206the following command: 250loaded.
251
252Based on the architecture and type of image (relocatable or not), one
253can choose to load the uncompressed vmlinux or compressed bzImage/vmlinuz
254of dump-capture kernel. Following is the summary.
255
256For i386:
257 - Use vmlinux if kernel is not relocatable.
258 - Use bzImage/vmlinuz if kernel is relocatable.
259For x86_64:
260 - Use vmlinux
261For ppc64:
262 - Use vmlinux
263For ia64:
264 (To be filled)
265
266If you are using a uncompressed vmlinux image then use following command
267to load dump-capture kernel.
207 268
208 kexec -p <dump-capture-kernel> \ 269 kexec -p <dump-capture-kernel-vmlinux-image> \
209 --initrd=<initrd-for-dump-capture-kernel> --args-linux \ 270 --initrd=<initrd-for-dump-capture-kernel> --args-linux \
210 --append="root=<root-dev> init 1 irqpoll" 271 --append="root=<root-dev> <arch-specific-options>"
211 272
273If you are using a compressed bzImage/vmlinuz, then use following command
274to load dump-capture kernel.
212 275
213Notes on loading the dump-capture kernel: 276 kexec -p <dump-capture-kernel-bzImage> \
277 --initrd=<initrd-for-dump-capture-kernel> \
278 --append="root=<root-dev> <arch-specific-options>"
279
280Following are the arch specific command line options to be used while
281loading dump-capture kernel.
282
283For i386 and x86_64:
284 "init 1 irqpoll maxcpus=1"
285
286For ppc64:
287 "init 1 maxcpus=1 noirqdistrib"
214 288
215* <dump-capture-kernel> must be a vmlinux image (that is, an 289For IA64
216 uncompressed ELF image). bzImage does not work at this time. 290 (To be filled)
291
292
293Notes on loading the dump-capture kernel:
217 294
218* By default, the ELF headers are stored in ELF64 format to support 295* By default, the ELF headers are stored in ELF64 format to support
219 systems with more than 4GB memory. The --elf32-core-headers option can 296 systems with more than 4GB memory. The --elf32-core-headers option can
@@ -231,6 +308,9 @@ Notes on loading the dump-capture kernel:
231* "init 1" boots the dump-capture kernel into single-user mode without 308* "init 1" boots the dump-capture kernel into single-user mode without
232 networking. If you want networking, use "init 3." 309 networking. If you want networking, use "init 3."
233 310
311* We generally don' have to bring up a SMP kernel just to capture the
312 dump. Hence generally it is useful either to build a UP dump-capture
313 kernel or specify maxcpus=1 option while loading dump-capture kernel.
234 314
235Kernel Panic 315Kernel Panic
236============ 316============