Re: Determine version of kernel that produced vmcore

From: Bernhard Walle
Date: Wed Jul 18 2007 - 19:11:15 EST


Hello,

* Ken'ichi Ohmichi <oomichi@xxxxxxxxxxxxxxxxx> [2007-07-18 16:07]:
> I propose the solution including Dan's, Vivek's and Bernhard's opinions.
> How about the following sequence for distributors ?
> (It is not necessary to rebuild 2nd-kernel initrd even if 1st-kernel changes.
> A new option "--mkdfinfo" is added to kexec command.)
>
> * On the kernel building system
> 1. Create the kernel files.
> # cd linux-2.6.xx
> # make
> 2. Create the mkdfinfo file from the vmlinux.
> # makedumpfile -g mkdfinfo-2.6.xx -x vmlinux
> (OSRELEASE is taken from the vmlinux.)
> 3. Pack the kernel package with the kernel files and the mkdfinfo file.
>
> * On each system
> 4. Preload 2nd-kernel and the mkdfinfo file.
> # kexec -p vmlinux-kdump --mkdfinfo=mkdfinfo-2.6.xx ...
> - 2nd-kernel is preloaded.
> - 1st-kernel's PAGESIZE is taken by sysconf().
> - The mkdfinfo file and the above PAGESIZE is preloaded
> into /proc/vmcore's PT_NOTE segment.
> 5. Panic happens, and the system switchs to 2nd-kernel.
> 6. Create a filtered dump file.
> # makedumpfile -cd31 /proc/vmcore dumpfile
> (User doesn't need to specify the mkdfinfo file, because the
> contents of the mkdfinfo file is included into /proc/vmcore.)

I like the proposal. The advantage over exporting the needed
information from the kernel directly is that makedumpfile (and the
contents of the mkdfinfo file [1]) can be changed without changing the
kernel which simplifies maintenance.

If now everybody agrees that this is the way to go, I can also offer
to implement the kernel and kexec userspace utility part
implementation of that stuff.

Maybe we should wait until Simon Horman is back here as he's the
current maintainer of kexec-tools(-testing).


Thanks,
Bernhard

[1] didn't we agree to vmcoreinfo?
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/