LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   What is System.map file? and why do we need it? (https://www.linuxquestions.org/questions/linux-general-1/what-is-system-map-file-and-why-do-we-need-it-8862/)

concoran 11-17-2001 09:17 PM

What is System.map file? and why do we need it?
 
When I installed a new kernel, the documentation said that I should copy the System.map and vmlinuz to /boot directory. I know vmlinuz is the kernel file, but am curious to know what System.map file is.

DavidPhillips 11-17-2001 09:40 PM

It contains the physical locations to everything and is required.

concoran 11-17-2001 09:48 PM

How and where do you specify a system.map file?

If I have two kernels in /boot file, would you need two map files? If yes, where and how do you specify names of the respective map files.

DavidPhillips 11-17-2001 10:21 PM

[root@alpha /boot]# ls -l System.*
lrwxrwxrwx 1 root root 29 Nov 16 00:15 System.map -> System.map-2.4.9-12ent
erprise
-rw-r--r-- 1 root root 410990 Apr 8 2001 System.map-2.4.2-2
-rw-r--r-- 1 root root 427953 Apr 8 2001 System.map-2.4.2-2enterprise
-rw-r--r-- 1 root root 428192 Jun 8 14:32 System.map-2.4.3-12
-rw-r--r-- 1 root root 434805 Jun 8 13:35 System.map-2.4.3-12enterprise
-rw-r--r-- 1 root root 438077 Oct 30 17:41 System.map-2.4.9-12
-rw-r--r-- 1 root root 457303 Oct 30 17:13 System.map-2.4.9-12enterprise
-rw-r--r-- 1 root root 437772 Oct 18 08:47 System.map-2.4.9-6
-rw-r--r-- 1 root root 456998 Oct 18 08:19 System.map-2.4.9-6enterprise
[root@alpha /boot]#

The first one in the list is the link pointing to the default map...

concoran 11-17-2001 11:38 PM

But where do you we specify the System.map file? I haven't seen a reference to it in lilo.conf, unlike for the kernel file.

Moreover, does it have to be always named 'System.map'?

DavidPhillips 11-18-2001 12:45 AM

I figured it was done by the suffix of the System.map file, If you boot a kernel thats not the default the link will not be used and it will use the one with the same version suffix..


but then theres the map.0301 and map.0341 files in the /boot folder of one of my systems which I don't know about, and on my laptop I have just one file called /boot/map without the suffix.

The lilo.conf file points to the map file

[david@microdot david]$ cat /etc/lilo.conf
boot="/dev/hda"
map=/boot/map

It looks like these were created when the system booted up.

Guess I have some more reading to do when I get time..

isajera 11-18-2001 02:18 PM

as far as i understand it, the System.map file contains the locations of all the functions active in the compiled kernel. the file can be named using versions - like System.map-2.4.5 or whatever version you happen to have.

i think it's there because on a modular kernel like linux, there needs to be a file to keep track of the locations of each kernel module, and where it's located or where it's inserted. i think :).

webtoe 11-18-2001 03:54 PM

things don;t break if you just use the one System.map for different versions of the kernel.

I always use the System.map that is created with my most recent kernel recompile and the old, backup kernel (2.2.14) works fine (except it complains because my startup scripts that load modules can't find them since they havn't been compiled in).

Alex

DavidPhillips 11-18-2001 05:01 PM

How about /boot/boot.b
 
I just set up a new system. I upgraded it to the 2.4.9-12 kernel

It removed the /boot/boot.b file somehow.

I began by converting to ext3 fs when I saw the kernel did not support it(2.2-2)

lilo complained about it being gone. I removed it from the lilo.conf file and running lilo still it complained about it. So I copied the boot.b file from another system. Then lilo complained about the linear line in lilo.conf which I changed to lba32 and now everything is ok.


Though I managed to get it working I am still a bit confused.

concoran 11-18-2001 09:42 PM

Thanks folks for your replies,
but I think I am going nowhere as far as System.map file is concerned. The only reason why I have an issue with this file is because when I build a new kernel, I have two kernel files (one new and one old), two system.map files. I know where and how to use kernel files, but am confused about the usage of system.map.

Thanks,
Ravi


All times are GMT -5. The time now is 02:15 AM.