lkml.org 
[lkml]   [1996]   [Nov]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: Finding System.map (was:Re: Kernel Profiling???? Please explain...)
On Sun, 3 Nov 1996, Robert Wuest wrote:
> Two questions:
>
> 1. Is there a standard way to get the exact uname info
> from an unbooted kernel image so I know what VEXT is
> before rebooting ( to install System.map-xxxx)? I can
> find the string in my /usr/src/linux/vmlinux file.

Yes. The full kernel version string is accessable via the setup-header
of the (b)zImage. The below entry for /etc/magic shows you how to find it:

0x202 string HdrS Linux/i386 Kernel
>0x206 short 0x0105 setupV1 zImage
>0x206 short 0x0200 setupV2
>>0x211 byte 0 zImage
>>0x211 byte 1 bzImage
>(0x20e.s+0x200) string >\0 "%6.6s"

If you have this entry in /etc/magic, 'file /vmlinuz' should display
what you need.

>
> 2. Is there a way to know what boot image was booted
> in a running system? I could just run the kernel image
> through md5sum to get an extension.

Yes:

cat /proc/cmdline

The variable BOOT_IMAGE= is set by the loader.
When using LILO it tells you the 'label', so you can scan /etc/lilo.conf
for the image that belongs to this label.
When using LOADLIN it tells you the base name of the image file.

Hans
<lermen@fgan.de>



\
 
 \ /
  Last update: 2005-03-22 13:38    [W:0.036 / U:0.080 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site