LinuxQuestions.org
Latest LQ Deal: Linux Power User Bundle
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 01-05-2004, 05:59 AM   #1
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Rep: Reputation: 30
What does the System.map file do?


I was reading some threads about compiling a new kernel, a few times the System.map file was mentioned. I remember last time I compiled my custom kernel, I had some problems with it, don't remember what.

Now I'd like to know what it is and does... what's its use.

tnx 4 help on this question...
 
Old 01-05-2004, 06:34 AM   #2
sirpelidor
Member
 
Registered: Oct 2003
Location: Madison
Distribution: mdk 8.2, 9.0, 9.2, slack 9.1
Posts: 403

Rep: Reputation: 30
There are 2 files that are used as a symbol table:
/proc/ksyms
System.map
Every time you compile a new kernel, the addresses of various symbol names are bound to change.

System.map is an actual file on your filesystem. When you compile a new kernel, your old System.map has wrong symbol information. A new System.map is generated with each kernel compile and you need to replace the old copy with your new copy.
 
Old 01-05-2004, 06:49 AM   #3
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Original Poster
Rep: Reputation: 30
So if you want to boot with an old kernel, you need the old files? If yes, how do you tell the kernel image what system.map to use?
 
Old 01-05-2004, 07:33 AM   #4
thebell
LQ Newbie
 
Registered: Dec 2003
Distribution: Gentoo
Posts: 25

Rep: Reputation: 15
AFAIK, you don't need a System.map file at all. My system was running for several months without one. All the information in System.map can be found in /proc/ksyms, and more (symbols from loaded modules). It's probably most useful when reporting a kernel bug, as you can discover in which function the problem occurred.
 
Old 01-05-2004, 07:53 AM   #5
sirpelidor
Member
 
Registered: Oct 2003
Location: Madison
Distribution: mdk 8.2, 9.0, 9.2, slack 9.1
Posts: 403

Rep: Reputation: 30
there sure quite some report showed System.map is not needed. but when i compile kernel, i got kernel panic if i don't change my System.map.....

i think if you recompiling the same kernel, you don't need to change System.map because the symbol information should be same anyway. this require guru to verify
 
Old 01-05-2004, 08:53 AM   #6
elluva
Member
 
Registered: Aug 2003
Location: Belguim, Ostend and Ghent
Distribution: Ubuntu
Posts: 600

Original Poster
Rep: Reputation: 30
so if I understand, the only system.map that could be important is the newest and when running a different kernel (with a different version), you don't need the old one...

tnx 4 the help
 
Old 01-05-2004, 11:43 AM   #7
fr0zen
Member
 
Registered: Nov 2003
Location: 127.0.0.1
Distribution: xubuntu
Posts: 217

Rep: Reputation: 30
Well what you could do is rename the old one like:

System.map-kernelversion. "Kernelversion" is what is returned by uname -r. Say you had kernel... 2.4.19 before, and now you upgraded to 2.4.23

You can name your system.map files like:

System.map-2.4.19
System.map-2.4.23
 
Old 01-05-2004, 12:09 PM   #8
moses
Senior Member
 
Registered: Sep 2002
Location: Arizona, US, Earth
Distribution: Slackware, (Non-Linux: Solaris 7,8,9; OSX; BeOS)
Posts: 1,152

Rep: Reputation: 49
Whether you need the System.map file depends on how you compile and install your kernel.
Redhat's kernel installation routine, for example, (used to, don't know about now) uses the
System.map file, but if you just do a:
Code:
make && make install
with a 2.6.x kernel, it'll take care of itself. On the 2.4.x kernels, I did:
Code:
make dep && make bzImage && make modules && make modules_install && cp 
arch/i386/boot/bzImage /boot/kernel_version && make clean
and then configure LILO. I never touched the System.map
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
boot/System.map: Bad file descriptor pixie Fedora 16 03-01-2005 01:19 PM
SYSERR(root): hash map "generics": missing map file /etc/mail/genericstable.db? singying304 Linux - Networking 4 02-28-2005 07:49 AM
No System.map file kaltag Linux - General 2 01-08-2004 06:28 AM
What is System.map file? and why do we need it? concoran Linux - General 9 11-18-2001 10:42 PM
System.map file bash Linux - Software 1 10-01-2001 04:46 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 10:33 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration