> +
> +If you decide to use second option (Relocatable kernel), then directly jump to
> +the section "Method 2".
> +
> +Method 1:
> +--------
>
> Download the mainline (vanilla) kernel source code (2.6.13-rc1 or newer)
> -from
http://www.kernel.org. Two kernels must be built: a system kernel
> -and a dump-capture kernel. Use the following steps to configure these
> -kernels with the necessary kexec and Kdump features:
> +from
http://www.kernel.org.
> +
> +Two kernels must be built: a system kernel and a dump-capture kernel.
> +Use the following steps to configure these kernels with the necessary kexec
> +and Kdump features:
>
> System kernel
> -------------
> @@ -198,22 +210,110 @@ The dump-capture kernel
> 7) Make and install the kernel and its modules. DO NOT add this kernel
> to the boot loader configuration files.
>
> +Skip following section and directly jump to "Load the Dump-capture Kernel"
> +section.
> +
> +Method 2:
> +--------
> +
> +Build Relocatable bzImage for dump-capture kernel (i386 only)
> +------------------------------------------------------------
> +Kernel version 2.6.20 onwards, i386 kernel bzImage has become relocatable.
> +That means, same kernel binary bzImage can be run from any physical address.
> +This takes away the limitation of building a special dump-capture kernel
> +compiled for a specific memory location for capturing the dump. Now one
> +has the flexibility of using the system kernel itself as the dump capture
> +kernel for i386.
> +
> +Download the mainline (vanilla) kernel source code (2.6.20-rc1 or newer)
> +from
http://www.kernel.org.
> +
> +1) Enable "kexec system call" in "Processor type and features."
> +
> + CONFIG_KEXEC=y
> +
> +2) Enable "kernel crash dumps" support under "Processor type and
> + features"
> +
> + CONFIG_CRASH_DUMP=y
> +
> + Leave "Physical address where the kernel is loaded" unchanged. By
> + default it is set to 0x100000 (1MB).
> +
> +3) Enable "Build a relocatable kernel" support under "Processor type and
> + features"
> +
> + CONFIG_RELOCATABLE=y
> +
> +4) Enable "/proc/vmcore support" under "Filesystems" -> "Pseudo filesystems".
> +
> + CONFIG_PROC_VMCORE=y
> + (CONFIG_PROC_VMCORE is set by default when CONFIG_CRASH_DUMP is selected.)
> +
> +5) On x86, enable high memory support under "Processor type and
> + features":
> +
> + CONFIG_HIGHMEM64G=y
> + or
> + CONFIG_HIGHMEM4G
> +
> +6) Enable "Compile the kernel with debug info" in "Kernel hacking."
> +
> + 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
> + and analyze a dump file.
> +
> +7) Enable "sysfs file system support" in "Filesystem" -> "Pseudo
> + filesystems." This is usually enabled by default.
> +
> + 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:
> +
> + grep 'CONFIG_SYSFS' .config
> +
> +8) Make and install the kernel and its modules. Update the boot loader
> + (such as grub, yaboot, or lilo) configuration files as necessary.
> +
> +9) Boot the system kernel with the boot parameter "crashkernel=Y@X",
> + where Y specifies how much memory to reserve for the dump-capture kernel
> + and X specifies the beginning of this reserved memory. For example,
> + "crashkernel=64M@16M" tells the system kernel to reserve 64 MB of memory
> + starting at physical address 0x01000000 for the dump-capture kernel.
> +
> + On x86 and x86_64, use "crashkernel=64M@16M".
>
> Load the Dump-capture Kernel
> ============================
>
> -After booting to the system kernel, load the dump-capture kernel using
> -the following command:
> +After booting to the system kernel, dump-capture kernel needs to be
> +loaded.
>
> - kexec -p <dump-capture-kernel> \
> +If you are using a separate dump capture kernel (method 1) then use
> +following command to load dump-capture kernel.
> +
> + kexec -p <dump-capture-kernel-vmlinux-image> \
> --initrd=<initrd-for-dump-capture-kernel> --args-linux \
> - --append="root=<root-dev> init 1 irqpoll"
> + --append="root=<root-dev> init 1 irqpoll maxcpus=1"
> +
> +If you are using a relocatable kernel (method 2), then use
> +following command.
>
> + kexec -p <bzImage-of-relocatable-kernel> \
> + --initrd=<initrd-for-relocatable-kernel> \
> + --append="root=<root-dev> init 1 irqpoll maxcpus=1"