All of lore.kernel.org
 help / color / mirror / Atom feed
* Firmware assisted dump support in dracut
@ 2012-11-28 16:12 Mahesh J Salgaonkar
       [not found] ` <20121128161234.GA8991-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org>
  0 siblings, 1 reply; 19+ messages in thread
From: Mahesh J Salgaonkar @ 2012-11-28 16:12 UTC (permalink / raw)
  To: Initramfs Dracut, Harald Hoyer
  Cc: Vivek Goyal, Ananth Narayan, Steven F Best, Haren Myneni

Hi Harald,

Last year I worked on adding Firmware assisted dump (fadump) support in
PowerLinux (ppc64). This feature is now accepted upstream Linux kernel and the
documentation is available at http://lwn.net/Articles/488132/

Like kdump, fadump also exports the memory dump through /proc/vmcore in ELF
format. This enables us to reuse the existing kdump infrastructure for dump
capture and filtering. However, unlike kdump, fadump does not use kexec-based
approach, instead it depends on Power firmware to preserve the memory dump and
reboot into new kernel. This is what happens in fadump after crash:

1. At the crash, kernel informs power firmware that kernel has crashed.
2. Firmware takes the control and reboots the entire system preserving only the
memory (resets all other devices).
3. The reboot follows the normal booting process (non-kexec).
4. The boot loader loads the default kernel and initrd from /boot

I am working on integrating fadump with existing kdump infrastructure. The
current kdump infrastructure builds a separate initrd (whenever there is a
change detected in kdump config file /etc/kdump.conf) which then gets loaded
into memory by kexec tool for use by kdump kernel. But, in the fadump approach,
the second kernel (after crash) always use the default (OS built) initramfs.
Hence, to support fadump, change is required to introduce dump capturing steps
in default initramfs itself. Hence the possible approaches I am looking into
are:

1. Rebuild the default initramfs every time when there is a change detected in
kdump config file (/etc/kdump.conf)
   This approach would modify existing initramfs in place. I did work on this
   approach by enhancing mkdumprd (tool from kexec-tools package) to extract
   and rebuild default initramfs with dump capturing steps.  After discussing
   with Vivek Goyal, he suggested that better approach to add code to dracut
   for rebuilding boot initramfs instead of enhancing mkdumprd.  This means
   introducing a new dracut module that will be responsible for introducing
   dump capture steps inside the rebuilt initramfs by pulling required modules
   e.g. ssh, nfs etc. depending on /etc/kdump.conf

   Now the question is whether it is possible for dracut to rebuild boot
   initramfs in place? if Yes, is there any issues in rebuilding of boot
   initramfs everytime when there is a change in /etc/kdump.conf?

2. Make dracut tool fadump aware and it will build fadump aware initrd (default
OS initrd) during kernel install. Once built, this initrd should never be
rebuilt again. Which means the default initramfs will contain vmcore capture
steps. This approach would pack all possible dracut modules (nfs, ssh, bonding
etc.) so that the default initrd will be capable of supporting all possible
dump target. Hence this approach will bloat the initramfs. On my Power test
system, the size of the default initrd generated without any changes is 16M.
With the above approach this size jumps to 27M.

Since both the above approaches would require changes to dracut package, I would
like to know your views on above approaches.

Thanks,
-Mahesh.
-- 
Mahesh J Salgaonkar

^ permalink raw reply	[flat|nested] 19+ messages in thread

end of thread, other threads:[~2013-06-06  8:34 UTC | newest]

Thread overview: 19+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-11-28 16:12 Firmware assisted dump support in dracut Mahesh J Salgaonkar
     [not found] ` <20121128161234.GA8991-xthvdsQ13ZrQT0dZR+AlfA@public.gmane.org>
2012-11-29 10:14   ` Harald Hoyer
     [not found]     ` <50B73598.804-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2012-11-30 15:31       ` Vivek Goyal
2012-12-06  6:21       ` Mahesh Jagannath Salgaonkar
     [not found]         ` <50C03971.4050104-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2013-05-30  5:17           ` Mahesh Jagannath Salgaonkar
     [not found]             ` <51A6E0E4.1000502-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2013-05-30  6:49               ` Harald Hoyer
     [not found]                 ` <51A6F663.5030804-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-05-30 14:23                   ` Vivek Goyal
     [not found]                     ` <20130530142318.GC2864-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-06-04  8:20                       ` Mahesh Jagannath Salgaonkar
     [not found]                         ` <51ADA343.2070100-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2013-06-04 13:57                           ` Vivek Goyal
2013-06-04 14:14                           ` Vivek Goyal
     [not found]                             ` <20130604141403.GG4799-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-06-04 14:21                               ` Vivek Goyal
     [not found]                                 ` <20130604142123.GH4799-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-06-05 13:44                                   ` Mahesh Jagannath Salgaonkar
     [not found]                                     ` <51AF40BB.5010703-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2013-06-05 14:55                                       ` Vivek Goyal
     [not found]                                         ` <20130605145504.GE16339-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-06-05 15:53                                           ` Vivek Goyal
     [not found]                                             ` <20130605155316.GI16339-H+wXaHxf7aLQT0dZR+AlfA@public.gmane.org>
2013-06-06  8:34                                               ` Mahesh Jagannath Salgaonkar
2013-06-04 15:19                               ` Michael Holzheu
2013-06-05  9:21                               ` Mahesh Jagannath Salgaonkar
2013-06-04  8:34                   ` Mahesh Jagannath Salgaonkar
     [not found]                     ` <51ADA6AB.5010503-23VcF4HTsmIX0ybBhKVfKdBPR1lH4CV8@public.gmane.org>
2013-06-04 18:42                       ` Andrey Borzenkov

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.