LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel
User Name
Password
Linux - Kernel This forum is for all discussion relating to the Linux kernel.

Notices


Reply
  Search this Thread
Old 04-18-2006, 09:30 PM   #1
brgr88
Member
 
Registered: Apr 2006
Distribution: Slackware 14.2
Posts: 48

Rep: Reputation: 15
System.map - what to do when I have multiple kernels in LILO?


When I compile a new kernel, I get a System.map file that I'm supposed to move into my /boot directory. This is according to the Slackware docs, but I'm assuming this applies to all distros which is why I'm posting here. Anyway...

I configure LILO to be able to boot from the new kernel(s) as well as the old one, but shouldn't each kernel require the System.map file that was made for when that kernel was compiled? If I'm reading this right, then I'll have to rename/copy System.map every time I want to boot a different kernel? I would think that sort of defeats the purpose of what LILO is supposed to do.

The manpage for lilo.conf didn't specify any options for a different System.map filename per image entry (the same way you can use a different kernel name in the 'image=' stmt.), so I guess I'm a little confused here.

What really is System.map doing that is getting changed each time I compile a kernel? And can I just keep using the same one for different kernels (even different kernel versions)?

If each kernel does require its own, custom System.map file, is there a way via LILO to specify this in that image's lilo.conf entry?
 
Old 04-19-2006, 07:28 AM   #2
geomatt
Member
 
Registered: Mar 2004
Location: PA
Distribution: Slackware 12.0
Posts: 315

Rep: Reputation: 30
I don't know if this is the right thing to do but here is what I have done when having more than one kernel on my system.

Suppose I have multiple kernels in the /boot directory called, say, vmlinuz, vmlinuz.old, and vmlinuz.veryold. Each has its own System file called System.map, System.old, and System.veryold, respectively. (I just rename everything including the current kernel and System.map file before installing the new kernel. Then I install by running "make install" which places the new kernel and System.map file in the /boot directory, and automatically runs lilo).

lilo.conf has the following entries:

image = /boot/vmlinuz
root = /dev/hda1
label = Linux
read-only

image = /boot/vmlinuz.old
root = /dev/hda1
label = Linux-old
read-only

image = /boot/vmlinuz.veryold
root = /dev/hda1
label = Linux-veryold
read-only

That seems to do the trick -- enabling me to boot all three kernels. Again, I do not know if this approach is theoretically correct, but maybe someone else will jump in here and educate us about the mysteries of the System.map file....


-geo

Last edited by geomatt; 04-19-2006 at 07:30 AM.
 
Old 04-19-2006, 07:48 AM   #3
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,471
Blog Entries: 7

Rep: Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573Reputation: 2573
Quote:
Originally Posted by brgr88
If each kernel does require its own, custom System.map file, is there a way via LILO to specify this in that image's lilo.conf entry?
Each kernel does require its own System.map file:

Code:
$ ls /boot
README.initrd@
System.map-2.6.11
System.map-2.6.14
System.map-2.6.16.1
boot.0300
config-2.6.11
config-2.6.14
config-2.6.16.1
map
memtest.bin
vmlinuz-2.6.11
vmlinuz-2.6.14
vmlinuz-2.6.16.1
$
And the relevant part of /etc/lilo.conf:
Code:
image=/boot/vmlinuz-2.6.11
  root=/dev/hda6
  label="2.6.11"
  vga=795
  read-only
image=/boot/vmlinuz-2.6.14
  root=/dev/hda6
  label="2.6.14"
  vga=795
  read-only
image=/boot/vmlinuz-2.6.16.1
  root=/dev/hda6
  label="2.6.16.1"
  vga=795
  read-only
I've never had problems doing things this way. Each kernel finds its own System.map without issue.

HTH.

Edit: I found a good website:

http://www.dirac.org/linux/system.map/

Have fun!

Last edited by rkelsen; 04-19-2006 at 07:54 AM.
 
1 members found this post helpful.
Old 04-19-2006, 08:48 AM   #4
geeman2.0
Member
 
Registered: Feb 2005
Location: Ontario, Canada
Distribution: Gentoo, Slackware
Posts: 345

Rep: Reputation: 30
Quote:
Edit: I found a good website:

http://www.dirac.org/linux/system.map/

Have fun!
Nice link!
It explained a lot, but it raises an important question which it leaves unanswered at the end.

If I have multiple kernels of the same version, each with different features enabled, how does the system determine which System.map to use?
 
Old 04-19-2006, 10:20 AM   #5
ioerror
Member
 
Registered: Sep 2005
Location: Old Blighty
Distribution: Slackware, NetBSD
Posts: 536

Rep: Reputation: 34
Quote:
If I have multiple kernels of the same version, each with different features enabled, how does the system determine which System.map to use?
Use the extra version variable to give each kernel a unique version number. With 2.4, edit the Makefile (before runing make dep), with 2.6 just use the "local version" option in the config.
 
  


Reply



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
Running Multiple Kernels unosaso Slackware 2 04-05-2005 11:50 AM
Multiple Kernels apocolpse Linux - Newbie 3 03-17-2005 03:09 AM
Multiple kernels question oneandoneis2 Slackware 5 06-25-2004 07:55 PM
System.map with several kernels? jontamask Slackware 3 05-23-2004 03:35 AM
Lilo on a floppy, multiple kernels escapee Linux - Newbie 9 05-11-2004 06:22 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software > Linux - Kernel

All times are GMT -5. The time now is 02:31 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
Open Source Consulting | Domain Registration