Skip to contentSkip to conversation

lilo and system maps?

DISCUSSION Robert L. Harris 3 participants 6 messages Dec 4, 2003

lore
Share & tools
lore
#0 lore raw

I'm messing around on one of my dev machines which has 4 possible kernels installed. 2.4, 2.4-stable, 2.6, 2.6-stable (stable is the last known good kernel). I currently have my System.map files laid out as:

/boot/System.map-2.6.0-test11-bk2
/boot/System.map-2.6.0-test10-bk4
etc.

Would it be possible, necessary, sane to have a lilo.conf similar to this:

image=/boot/vmlinuz-2.4

	label=current
	map=System.map-2.4
	read-only

image=/boot/vmlinuz-2.4.stable

	label=stable
	map=System.map-2.4.stable
	read-only
	optional

image=/boot/vmlinuz-2.6

	label=2.6
	map=System.map-2.6
	read-only
	optional

image=/boot/vmlinuz-2.6.stable

	label=2.6-stable
	map=System.map-2.6.stable
	read-only
	optional

This way when I install a new kernel I can copy the System.map to /boot/System.map-2.6 instead of keeping up with all the version numbers? lilo doesn't seem to like the map= arguements. Does the kernel need the System.map in a single place, can it figure out where it's at for a multiple config?

Robert

:wq!
---------------------------------------------------------------------------
Robert L. Harris | GPG Key ID: E344DA3B

                                         @ x-hkp://pgp.mit.edu

DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.

Life is not a destination, it's a journey.
Microsoft produces 15 car pileups on the highway.
Don't stop traffic to stand and gawk at the tragedy.

#1 lore raw
Quoted 7 lines · Robert L. Harris

I'm messing around on one of my dev machines which has 4 possible kernels installed. 2.4, 2.4-stable, 2.6, 2.6-stable (stable is the last known good kernel). I currently have my System.map files laid out as:

/boot/System.map-2.6.0-test11-bk2
/boot/System.map-2.6.0-test10-bk4
etc.

^^^

Quoted 5 lines

This way when I install a new kernel I can copy the System.map to /boot/System.map-2.6 instead of keeping up with all the version numbers? lilo doesn't seem to like the map= arguements. Does the kernel need the System.map in a single place, can it figure out where it's at for a multiple config?

Just stick with the System.map-$(uname -r) variant and it will just work automaticly. map= in lilo is not for System.map's.

#2 lore raw

Thus spake Andre Tomt ([email protected]):

Quoted 10 lines · Robert L. Harris
Quoted 7 lines

I'm messing around on one of my dev machines which has 4 possible kernels installed. 2.4, 2.4-stable, 2.6, 2.6-stable (stable is the last known good kernel). I currently have my System.map files laid out as:

/boot/System.map-2.6.0-test11-bk2
/boot/System.map-2.6.0-test10-bk4
etc.

^^^

Quoted 9 lines
Quoted 5 lines

This way when I install a new kernel I can copy the System.map to /boot/System.map-2.6 instead of keeping up with all the version numbers? lilo doesn't seem to like the map= arguements. Does the kernel need the System.map in a single place, can it figure out where it's at for a multiple config?

Just stick with the System.map-$(uname -r) variant and it will just work automaticly. map= in lilo is not for System.map's.

Upon reading the man page on lilo.conf again I realized that was the wrong map, but was hoping there was some notation that'd allow for maps other than "/boot/System.map" for the multiple kernels.

Ok, I've tried rdev and file, is there a "cleaner" way of getting a kernel version other than:

{0}:/usr/share/doc/lire>strings /boot/vmlinuz-2.6 | grep -i 2.[46] | head 2.6.0-test11-bk2 (root@wally) #3 SMP Thu Dec 4 12:41:42 EST 2003 M2#6gbQ+
{2 6B
.2'4]
AG2{6
b2)42
2y6&LD
2U6;
214<|7
2"6:

Yes it's functional, I can live with it, just wondering if theres a "better" way for when I'm updating servers at work and have no idea what kernels are in /boot on the machine (some have been up longer than the year+ I've been here).

:wq!
---------------------------------------------------------------------------
Robert L. Harris | GPG Key ID: E344DA3B

                                         @ x-hkp://pgp.mit.edu

DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.

Life is not a destination, it's a journey.
Microsoft produces 15 car pileups on the highway.
Don't stop traffic to stand and gawk at the tragedy.

#5 lore raw
In reply to Robert L. Harris

If I'm not mistaken the map file specified in map= is -not- the System.map file of the kernel, it's a lilo specific map file and has nothing to do with System.map. Indeed it'll probably overwrite the System.map file. you don't want to specify map= anything other than /boot/map unless your /boot directory is somewhere else. As for system.map I have my boot scripts deleting and symbolic linking /boot/System.map to /boot/System.map-uname -r (these files actually exist) right after boot. (not sure maybe this isalready done by the standard distribution of RH, I do remember fooling around with it though...)

Cheers,
MaZe.

#3 lore raw
In reply to Robert L. Harris
Quoted 5 lines

{0}:/usr/share/doc/lire>strings /boot/vmlinuz-2.6 | grep -i 2.[46] | head 2.6.0-test11-bk2 (root@wally) #3 SMP Thu Dec 4 12:41:42 EST 2003 M2#6gbQ+
{2 6B

Of course the correct solution is to have the kernel version in the file name... and have linux-current or whatever as a symlink. Besides truth be told the kernel version is far too little to identify a kernel anyway, there's also compilation options - they can change a lot - and all the patches which were/are applied to it. I keep System.map-uname -r, vmlinuz-uname -r, .config-uname -r, descr-uname -r in my /boot dirs
- the first three come from the kernel and the last is a text file containing notes about what patches were applied (I keep an up to date descr file in each kernel source dir).

Cheers,
MaZe.

#4 lore raw

Thus spake Maciej Zenczykowski ([email protected]):

Quoted 16 lines
Quoted 5 lines

{0}:/usr/share/doc/lire>strings /boot/vmlinuz-2.6 | grep -i 2.[46] | head 2.6.0-test11-bk2 (root@wally) #3 SMP Thu Dec 4 12:41:42 EST 2003 M2#6gbQ+
{2 6B

Of course the correct solution is to have the kernel version in the file name... and have linux-current or whatever as a symlink. Besides truth be told the kernel version is far too little to identify a kernel anyway, there's also compilation options - they can change a lot - and all the patches which were/are applied to it. I keep System.map-uname -r, vmlinuz-uname -r, .config-uname -r, descr-uname -r in my /boot dirs
- the first three come from the kernel and the last is a text file containing notes about what patches were applied (I keep an up to date descr file in each kernel source dir).

Quoted 3 lines

Cheers,
MaZe.

I'm maintaing machines that pre-exist me and many don't have vmlinuz-uname -r naming and can't quite reboot the machine on different kernels just to find out what it is.

Did the symlink think but it got ugly after a while when I had 6 kernel, 6 System.map files and a bunch of symlinks. Once I fully drop the 2.4 on this set of machines I can move back but it was just ugly for a while.

:wq!
---------------------------------------------------------------------------
Robert L. Harris | GPG Key ID: E344DA3B

                                         @ x-hkp://pgp.mit.edu

DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.

Life is not a destination, it's a journey.
Microsoft produces 15 car pileups on the highway.
Don't stop traffic to stand and gawk at the tragedy.