Messages in this thread | | | Date | Tue, 10 Jul 2007 23:36:45 +0300 | From | Dan Aloni <> | Subject | Re: Determine version of kernel that produced vmcore |
| |
On Tue, Jul 10, 2007 at 03:00:09PM -0400, Neil Horman wrote: > On Tue, Jul 10, 2007 at 08:35:41PM +0300, Dan Aloni wrote: >[...] > > > > Isn't there some sort of a circular dependency going on here? As I > > understand it the vmlinux binary already contains the initramfs as > > built-in data (at least that's what I use here for initramfs). It > You're misunderstood. The vmlinux binary and the initramfs are stored in the > same protected memory area when you execute a kexec -l, but they are separate > and distinct files. > > > makes more sense if you guys are creating an _initrd_ image (that's > > what mkinitrd originally did AFAIK) and supply it to the boot-loader. > initrd is old, initramfs is the new way to go, but they effecitvley do the same > thing, and while the initramfs _can_ be built into the kernel, it can also be > separately managed (which is what most distros tend to do, AFAICS). > Neil
Yes, I was under the impression that the external initramfs was the 'special case' and I seem to forget about it, I guess that's what most kernel distribution still do (I haven't been using a distribution-supplied kernel for quite a while...).
Anyway, the patches I contributed in one the previous mail (didn't reach the kexec list due to moderation but available on LKML) can help with what Bernhard is aiming for. I took quite a dive into makedumpfile's code to figure out what's the best way to integrate it. What I was thinking was something in the lines of:
* early on, detect if /proc/vmcore has a LINUX elf note * if it has, then don't require '-x' or '-i' on the command line, extract it to a temporary file and treat it as a CONFIGFILE for the rest of the code flow. * otherwise, continue with the regular flow.
For just extracting OSRELEASE, it is possible to write a simple program or script that searches for it at the first few kilobytes of the file.
-- Dan Aloni XIV LTD, http://www.xivstorage.com da-x (at) monatomic.org, dan (at) xiv.co.il - To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/
| |