klogd and System.map
b3nton at gmail.com
Thu Feb 18 14:23:13 PST 2010
On 18/02/10 20:57, Bruce Dubbs wrote:
> I've noticed an irritating message when klogd starts up. It says:
> Cannot find map file.
> I traced the cause of this message. System.map is a dump of the kernel
> symbols using nm. klogd finds the System.map, but rejects it because
> there is no symbol with the name "Version_xxxxxx" where xxxxxx is a
> decimal conversion of the kernel's major/minor/patch (e.g. 2.6.32).
> Researching some more, it looks like the kernel removed this symbol by
> default somewhere around 2.6.27. sysklogd has not been updated since 2007.
> I checked some other distros. The ones I found still have the Version_
> symbol (grep Version_ System.map). They are generally using older
> kernels with back ported patches.
> My understanding is that klogd reads the symbols to translate kernel
> oops to symbols. I think I saw that the kernel is now doing that
> internally. In that case, there is no need for klogd to read System.map
> at all.
> To stop klogd from trying to read System.map, it requires passing -x in
> the command line. We can do that easily in the boot scripts.
> What this also implies is that we don't need to copy System.map to /boot
> at all. My analysis may have not gone deep enough, but I want to get
> this out for other opinions.
What I do is modify the boot script to start klogd with the -k /path/to/System.map option.
It removes that annoying "Cannot find map file" message.
boot_mesg "Starting the kernel log daemon..."
loadproc klogd -k /boot/System.map
More information about the lfs-dev