LinuxQuestions.org
Review your favorite Linux distribution.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 04-28-2004, 02:08 AM   #1
strsst
LQ Newbie
 
Registered: Dec 2003
Distribution: Slackware 9.0
Posts: 12

Rep: Reputation: 0
System.map curiosities...


My questions concern the creation of a new kernel and booting the old kernel...The Slackware book suggests that you "...add a section to boot your old kernel in case your new one does not work." Now, the new system.map file (when the installation of the new kernel is complete) is associated with the new kernel image.

1. If I boot the old kernel, does the system use the old system.map file or the new file (or the specified file)? I have read about lilo and how to specify a system.map file. It seems that the mapfile setting is a global setting (I tried to set it in the image section of the file and quickly learned that I could not do this since lilo gave me an error on the line where I had the map file specified)...

///////////////////////////////////////////////////
The following code is INCORRECT
////////////////////////////////////////////////////

#-------------------------------------------------
#New Kernel Section, after 4-8-04
image = /boot/vmlinuz.beast
map=/boot/System.map.beast "<-- Error here"
root = /dev/hda5
label = swlinux_beast
read-only # Non-UMSDOS filesystems should be mounted read-only for checking
# Linux bootable partition config ends


///////////////////////////////////////////////////
The following code is correct
////////////////////////////////////////////////////

# Start LILO global section
boot = /dev/fd0
map = /boot/System.map <-- mapfile specified in the global section

2. If the old kernel uses the new map file, won't there be errors between the old kernel and the new map file?

3. Does there need to be a new boot disk for each kernel or can you have many kernels boot from one boot disk and use the same map file?

4. I understand this may be a trivial matter and I would love to read more about this topic. Is there anywhere on the internet or in print where I could read more about the relationship between the kernel and the map file?

Thanks in advance!
 
Old 04-28-2004, 04:15 AM   #2
Qucho
Member
 
Registered: Mar 2004
Location: Colorado, US
Distribution: Debian "Sarge"
Posts: 228

Rep: Reputation: 30
I have no idea about the function of the system.map file, I am a big newbie

But after several custom kernels I have made, I never worried for such file. I just compile the kernel installed and choose what kernel to run at boot.

I never had a problem.
 
Old 04-28-2004, 04:46 AM   #3
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
System.map is a symbolic link to the newest Sytem.map file.
example, 2.4 kernel.

System.map -> System.map-2.4.20-6

BTW, I couldn't answer your question, because I cannot decipher what your asking.
 
Old 04-28-2004, 04:49 AM   #4
AutOPSY
Member
 
Registered: Mar 2004
Location: US
Distribution: Redhat 9 - Linux 2.6.3
Posts: 836

Rep: Reputation: 31
2. If the old kernel uses the new map file, won't there be errors between the old kernel and the new map file?

The kernel and the mapfile are not the same files, nor contain the same content.
Why would there be "errors" between them?
 
Old 04-28-2004, 05:26 AM   #5
Kroenecker
Member
 
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Rep: Reputation: 30
This link clearly explains the system map:

www.dirac.org/p/linux/system.map/
 
Old 04-30-2004, 09:04 AM   #6
strsst
LQ Newbie
 
Registered: Dec 2003
Distribution: Slackware 9.0
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks for the replies. I apologize for being unclear in my first post. My thoughts were that when you recompiled the kernel, the new system.map file takes precidence over any other system.map file in the file system regardless of any other kernel you use. The "Recompiling The Kernel" instructions in the Slackware book explain this clearly.

However, would there be errors if in fact you used the old kernel with the new system.map file (or any other system.map file)? The Slackware book suggests that you may use your old kernel to boot your system in case your new kernel crashed the system or didn't work for whatever reason. When I compiled the new kernel and compared the old system.map file to the new system.map file, the size was different. I began to suspect something may go wrong if I used an old kernel with the new system.map file. When I first tried it everything went well and nothing crashed.... THAT TIME nothing crashed with that kernel, but what about with other kernels using the same system.map file? (see example below)

Obviously, when you select the new kernel to boot, there shouldn't be a problem because the new system.map file that was created when the new kernel was compiled is used.

BUT, when you select the old kernel, you still use the new system.map file. My question basically was, will this cause any problems? We know it won't when we use the new kernel. However, will it when we use other kernels?

This can be taken further because if you create multiple kernels and would like to boot them from the same bootdisk, you will use the most recently created system.map file. So now you have 5 kernels and each are using the new system.map file. Now I ask the question, "do you need to create a boot disk for each new kernel, one that uses the associated system.map file?"

AutOPSY, I understand that the kernel and the system.map are 2 different files. After recompiling the kernel several times, this fact becomes trivial. Another trivial fact is that system.map is a symbolic link. The instructions in the Slackware book explicity show this. I was using system.map as a general reference. There would be no errors when used in conjunction with each other, however my question is "would there be a problem if a kernel not created at the same time as a system.map file was used to boot a system?" For example:

Boot time:

New.Kernel ---> uses ---> System.map.new
No Errors!!


Old.Kernel ---> uses ---> System.map.new
Possible errors???


Old.Kernel.FitsOnFloppy ---> uses ---> System.map.new
Possible errors???


Old.Kernel.GBitEthernet ---> uses ---> System.map.new
Possible errors???


Old.Kernel.P4Optimized ---> uses ---> System.map.new
Possible errors???


(please note: all kernels located on same system)

The code I provided was to illustrate how lilo processes the 'map=' parameter. An error will be generated if the map files is not specified globally. In other words, you will get an error if you list the map file setting within your linux kernel section. Lilo won't update the boot configuration on your floppy (or harddrive).

Kroenecker, the link you provided was excellent. There is much more information about linux located at that particular site...check it out if you haven't already done so.

Anyway, the moral of the story is: has anybody else out there had problems using multiple kernels with a single system.map file?

Thanks again for all of your replies!
 
Old 04-30-2004, 09:38 AM   #7
Kroenecker
Member
 
Registered: May 2003
Location: The States
Distribution: Gentoo
Posts: 245

Rep: Reputation: 30
I would recommend that you read or reread the link that I posted because to be honest I can tell that you didn't read it at all or didnt read it thoroughly.

Last edited by Kroenecker; 04-30-2004 at 09:41 AM.
 
Old 04-30-2004, 10:27 PM   #8
Qucho
Member
 
Registered: Mar 2004
Location: Colorado, US
Distribution: Debian "Sarge"
Posts: 228

Rep: Reputation: 30
Quote:
I would recommend that you read or reread the link that I posted because to be honest I can tell that you didn't read it at all or didnt read it thoroughly.
indeed !!! LOL....

Now I even know that I could DELETE my system.map entirely from my compu and worry not more than if my coffe has cream on it !! ;P
 
Old 05-01-2004, 04:40 AM   #9
strsst
LQ Newbie
 
Registered: Dec 2003
Distribution: Slackware 9.0
Posts: 12

Original Poster
Rep: Reputation: 0
Thanks. didn't read the bottom part. you should really check out the rest of the site. good stuff.

////////////////////////////////////////////////////////////
How Do I Remedy The Above Situation?

The solution is to keep all your System.map files in /boot and rename them with the kernel version. Suppose you have multiple kernels like:

/boot/vmlinuz-2.2.14
/boot/vmlinuz-2.2.13

Then just rename your map files according to the kernel version and put them in /boot, like:

/boot/System.map-2.2.14
/boot/System.map-2.2.13

Now what if you have two copies of the same kernel? Suppose you have two copies of 2.2.14. One compiled with sound, and the other without sound:

/boot/vmlinuz-2.2.14
/boot/vmlinuz-2.2.14.nosound

The best answer would be if all software looked for the following files:

/boot/System.map-2.2.14
/boot/System.map-2.2.14.nosound

But to be honest, I don't know if this is the best situation. Everything I've seen searches for "System.map-version" but what about "System.map-version.extraversion"? I have no idea (TODO).
////////////////////////////////////////////////////////////
 
  


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 Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
What is System.map and where should it go? blish_blash Linux - General 4 10-23-2004 01:23 PM
System.map ??? theonebeyond Linux - General 3 09-08-2004 07:19 PM
System.map rgiggs Mandriva 0 06-27-2004 06:34 PM
What is System.map for? ivanatora Linux - General 2 12-18-2003 05:23 PM
System Map vexer Slackware 3 06-06-2003 08:10 PM


All times are GMT -5. The time now is 12:31 PM.

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