Linux - NewbieThis 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!
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Introduction to Linux - A Hands on Guide
This guide was created as an overview of the Linux Operating System, geared toward new users as an exploration tour and getting started guide, with exercises at the end of each chapter.
For more advanced trainees it can be a desktop reference, and a collection of the base knowledge needed to proceed with system and network administration. This book contains many real life examples derived from the author's experience as a Linux system and network administrator, trainer and consultant. They hope these examples will help you to get a better understanding of the Linux system and that you feel encouraged to try out things on your own.
Click Here to receive this Complete Guide absolutely free.
I've been poking around with recompiling my kernel, and ran into something that confuses me.
What is the importance of the System.map file and is there a way to specify using a different one (for instance, instead of /boot/System.map use /boot/System.map-2.4.18-15)?
I'm using Red Hat 8.0 with GRUB as the boot loader. The contents of the boot directory contain the kernel images for two Red Hat-install-provided kernel images:
It also contains two System.map files:
And finally, two similarly named initrd files:
There is a symbolic link pointing to the smp versions of the files:
vmlinuz -> vmlinuz-2.4.18-14smp
System.map -> System.map-2.4.18-14smp
So far, I'm ok. The confusion comes when I look at the grub.conf file. Each option contains only four lines:
title <menu option title>
kernel <appropriate image; not using symlink> ro root=LABEL=/ hdd=ide-scsi
initrd <appropriate image>
If I choose to boot the non-smp kernel, how does the kernel know to use the non-smp System.map file? The two System.map files I mentioned before are different, confirmed with a simple diff command. Is it possible the initial RAM disk provides the appropriate symlink?
The reason I ask is I'd like to recompile the kernel. The only thing I can't figure out is the vmlinuz-to-System.map connection. It's trivial to add these lines to the grub.conf:
title Custom Kernel: 2.4.18-15
At least, I think that's all I'd need, but I don't know what option, if any, to give the kernel for the appropriate SYstem.map file.
Well basically the System.map file is a symbol tabel which is used by the klogd. Your kernel will still boot without it(or the wrong one) but it will generate a lot of warning messages.
Normally if you have just one kernel then just having the file /boot/System.map is enough. Everytime you compile the kernel a new System.map file is generated which should also be copied to the /boot directory.
The problem is however when you have multiple kernels to choose from. Then just one System.map file is not enough. Now according to the klogd manpages the System.map file will be searched for in the following locations.
What is however not documeted in the man pages is that it will also search for a filename appended with the version. So after compiling your kernel you should copy the System.map file to the boot directory and append it with the version name. Something like "System.map-2.4.20"
Well they have two kernels there with the same version, one with smp support and one without. So they will also need two System.map files. I guess the symlink to the System.map-2.4.18-14smp file is there if it can't find it's symbols in the System.map-2.4.18-14 file because it's the wrong version then it can always still look in the System.map file.