# System.map missing help...

## stardotstar

I think I have been failing to copy any kind of system.map to boot when I rebuild kernels - I have googled around on this and found that since I do a make && make modules_install then copy manually the bzImage to /boot and do the /grub/menu.lst in vi I am not actually copying the new - or even an old system.map to the boot.

It seems that this is not causing any major problems but I see an error on boot...

I have tried to do this - copying the System.map from the root of the sources for my current kernel to /boot and linking thus:

```

wparker@geko ~ $ ls -l /boot

total 21156

-rw-r--r--  1 root root 2030697 Mar 21 01:47 Gentoo_2006.0-2.6.15-alpha

-rw-r--r--  1 root root 2058496 Mar 20 17:33 Gentoo_2006.0-2.6.15-beta

-rw-r--r--  1 root root 2104536 Mar 22 20:54 Gentoo_2006.0-2.6.15-charlie

-rw-r--r--  1 root root 2120378 Mar 27 21:19 Gentoo_2006.0-2.6.15-delta

-rw-r--r--  1 root root 2181603 Mar 28 07:16 Gentoo_2006.0-2.6.15-echo

-rw-r--r--  1 root root 2111965 Mar 28 07:56 Gentoo_2006.0-2.6.15-foxtrot

-rw-r--r--  1 root root 2116411 Mar 29 11:46 Gentoo_2006.0-2.6.15-golf

-rw-r--r--  1 root root 2195167 Mar 29 19:37 Gentoo_2006.0-2.6.16-alpha

-rw-r--r--  1 root root 1883826 Mar 31 07:20 Gentoo_2006.0-2.6.16-bravo

-rw-r--r--  1 root root 1906120 Apr  6 20:27 Gentoo_2006.0-2.6.16-charlie

lrwxrwxrwx  1 root root      17 Apr  6 20:42 System.map -> System.map-2.6.16

-rw-r--r--  1 root root  892421 Apr  6 20:26 System.map-2.6.16

lrwxrwxrwx  1 root root       1 Mar 20 23:24 boot -> .

drwxr-xr-x  2 root root    4096 Apr  6 19:38 grub

```

does this look sane? or have I missed something completely? 

Thanks guys.

Will

----------

## NeddySeagoon

stardotstar,

System.map is a list of kernel function start addresses, its only needed for kernel debugging and nicer error messages, so you get function names instead of an address when the kernel does something you would rather it didn't.

I don't use System.map.

----------

## stardotstar

Thanks for that!   :Very Happy:   Can you confirm if the presence of the SymLink and the copy of the built System.map in boot should be OK though - In the end I will discard it and not worry but I would like to know that I have put the right one in the right place anyway!

Will

----------

## NeddySeagoon

stardotstar,

The symlink and  System.map-2.6.16 entries in your /boot are OK, however, be aware that you must change the symlink to point to the System.map provided with the kernel you are actually running if you want correct error reports.

You will always get error reports based on System.map-2.6.16 with your present settings, they will be misleading if you happen to be using a different kernel.

----------

## stardotstar

Hmmm,, still reports it as missing when I boot...  I guess I don't have to worry  but It bugs me  :Smile: 

----------

## richard.scott

I've had that message too. I put it down to something I'd not done, but if you look at the end of /sbin/modules-update you see this code where the error message is being displayed from:

```
# We also call depmod here to stop insmod from complaining that modules.conf

# is more recent then modules.dep

#

if [ -d "`depdir`" -a -f /proc/modules ]

then

        if [ -f /usr/src/linux/System.map ]; then

                depmod -a -F /usr/src/linux/System.map ${KV}

        else

                ewarn "System.map not found - unable to check symbols"

        fi

fi
```

If you've cleaned up your kernel source tree with "make clean" or something like that its most likely removed the /usr/src/linux/System.map file from your system.

If you want to remove this error message, try re-compiling your kernel and rebooting.

----------

## stardotstar

Hmmm, thanks for the reply I will have to consider this for a bit - I have copied several System.map files from the just built source root directory to /boot where I link them - ie System.map always links to my latest Map - supposedly... So I have recompiled a few times but I'm not sure that I have made clean in between - mostly I recompile when I need a small new additional option and don't do a make clean...

here is my boot -

```

geko ~ # ls -l /boot 

total 23900

-rw-r--r-- 1 root root 2030697 Mar 21 01:47 Gentoo_2006.0-2.6.15-alpha

-rw-r--r-- 1 root root 2058496 Mar 20 17:33 Gentoo_2006.0-2.6.15-beta

-rw-r--r-- 1 root root 2104536 Mar 22 20:54 Gentoo_2006.0-2.6.15-charlie

-rw-r--r-- 1 root root 2120378 Mar 27 21:19 Gentoo_2006.0-2.6.15-delta

-rw-r--r-- 1 root root 2181603 Mar 28 07:16 Gentoo_2006.0-2.6.15-echo

-rw-r--r-- 1 root root 2111965 Mar 28 07:56 Gentoo_2006.0-2.6.15-foxtrot

-rw-r--r-- 1 root root 2116411 Mar 29 11:46 Gentoo_2006.0-2.6.15-golf

-rw-r--r-- 1 root root 2195167 Mar 29 19:37 Gentoo_2006.0-2.6.16-alpha

-rw-r--r-- 1 root root 1883826 Mar 31 07:20 Gentoo_2006.0-2.6.16-bravo

-rw-r--r-- 1 root root 1906120 Apr  6 20:27 Gentoo_2006.0-2.6.16-charlie

-rw-r--r-- 1 root root 1906551 Apr 12 18:44 Gentoo_2006.0-2.6.16-delta

lrwxrwxrwx 1 root root      23 Apr 12 18:47 System.map -> System.map-2.6.16-delta

-rw-r--r-- 1 root root  892421 Apr  6 20:26 System.map-2.6.16

-rw-r--r-- 1 root root  892722 Apr 12 18:45 System.map-2.6.16-delta

lrwxrwxrwx 1 root root       1 Mar 20 23:24 boot -> .

drwxr-xr-x 2 root root    4096 Apr 12 18:47 grub

```

so you can see I have tried to do a couple of System.maps since I started to worry about that  message.

Any ideas appreciated and thanks for following up on it and finding that init reference!

Will

----------

## przeuj

maybe you could simply ls -l /usr/src/linux/System.map and see if its really there... :]

if not: make && make modules_install and should be ok.

Bartek

----------

## limn

Not always is Quick Search helpful, but searching for System.map finds this

duplicate thread

Which refers to this

thread

Basically you can

A. edit /sbin/modules-update

B. upgrade baselayout

C. live with harmless warning

----------

## stardotstar

Thank you limn you have well established my inability to search - I do use quick search - and I have a phpBB board which is heavily modified but not with quick search !!  :Smile:  ; your references should sort me out I imagine(I  like a b and c  :Smile:  )  - btw Bartek- thanks for the suggestion - the system map I refer to is actually copied to /boot and linked from there so, yes it is there -thanks for the lateral thinking but I think it has more to do with a partitioning thing as limn has directed me to.

 :Smile: 

UPDATE

I have System.map in / now and the message is something it looks like I have to live with for the moment!

----------

## BillyBob-SA1

Well folks,

If that error really does come from that script, I can understad why we are getting the error.

That script is called PRIOR to mounting any files systems except /    :Rolling Eyes: 

If your /usr is on a separate partition, it will never find that System.map in the source files.  <Booo>

I think this is kind of a bug as the kernel is supposed to look in /boot first, then look in /usr/src/linux next.  This is impossible when the /usr isn't mounted first.

I just changed my  script to look in /boot for the System.map, and Voila:

* Calculating module dependencies ...                                    [ ok ]  :Laughing: 

Just thought I'd drop this note to let you know...

----------

## NeddySeagoon

BillyBob-SA1,

Post a bug, along with your fix.

----------

## BillyBob-SA1

That's why I said it's "kinda" a bug   :Confused: 

I come from the old school where / has the boot dir.  And, System maps are put there by kernel name, then linked to System.map.  I have also read that the kernel is supposed to look for it there first as I mentioned before.  However, with all the different ways folks configure their system, if you don't follow the boot in the root method, how's the script gonna find it.  From reading in a different thread, the masked baselayout has not changed their process much, as in a round about way, STILL looks in /usr/src/linux, but they removed the error in the script so it doesn't complain.   :Rolling Eyes:   Dumb!

Since I haven't kept up much on all the methods of configuring the boot partitions, and all the way possible to configure that, I would make a poor person to suggest a fix.

I presume (bad idea on my part) that if there is a separate partition for boot, then once the switch is made to the real / partition, stuffing the system map in there isn't going to do much good because boot partition is no longer available.  :Very Happy: 

So where to put it would be a serious question, short of /System.map which suxs.  AND, looking in /usr/src/linux without looking elsewhere first also sux, because if I compile a new kernel to test, I do not move the linux link to that kernel until I am sure it works.  I copy the new system map under the kernel name I am testing to /boot, then link /boot/System.map to that kernel for testing.  i.e.

System.map -> System.map-2.6.15-gentoo-r1-Pre-Prod-1

test -> kernel-2.6.15-gentoo-r1-Pre-Prod-1

I use lilo -R test and make sure it comes up correctly, else if it locks up, I just have to power cycle and it comes back up on vmlinuz which is linked to the functional kernel.

Unless they change where that script runs, which is probably impossible, or they rewrite the script with a bunch of "OR's" to look in all the places possible, it's a catch 22.

Just my 2 cents...

----------

## NeddySeagoon

BillyBob-SA1,

As you say, /boot is not normally mounted - so thats a bad place for System.map and /usr/src/linux may bit poitn to thw right kernel.

/lib/modules/`uname -r`/source/ works and is always right for the running kernel

----------

## BillyBob-SA1

Most correct.  However, we are at another catch 22.

[18:00][root@ben:~]# vs /lib/modules/`uname -r`/source

lrwxrwxrwx 1 root root 31 Dec 21 19:53 /lib/modules/2.6.14-gentoo-r4-Athlon-Production-1/source -> /usr/src/linux-2.6.14-gentoo-r4

That still points to a location that is not mounted yet when the script is scheduled to run   :Laughing: 

No matter how hard you try, you cannot get there from here.  = Losing battle.

Have a great day.

----------

## limn

modules-update had been looking for System.map in /usr/src/linux/ and in some cases not finding it.  Then the code was changed to complain in those cases. And then the posting started.

 *BillyBob-SA1 wrote:*   

> they rewrite the script with a bunch of "OR's" to look in all the places possible

 

Essentially this is what the most recent testing version of modules-update does.

----------

## NeddySeagoon

limn,

You are right, if neither /usr nor /boot are mounted when the script runs, its game over.

----------

