LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Slackware (https://www.linuxquestions.org/questions/slackware-14/)
-   -   questions about kernel 2.6 install (https://www.linuxquestions.org/questions/slackware-14/questions-about-kernel-2-6-install-414978/)

sunman 02-13-2006 12:31 PM

questions about kernel 2.6 install
 
Just a quick question, I'm doing my first dl/compile/install of a kernel. Before I've just used the slackware packages for 2.4 and 2.6 but I decided to dl 2.6.15.4 to install myself.

I did the menu configure, did the make bzImage, make modules and make modules_install. I copied arch/i386/boot/bzImage to /boot/vmlinuz-2.6.15.4 and I also copied System.map to /boot/System.map-2.6.15.4.

Now my question is this, I read the kernel compile guide for 2.6 on the forum here, and one of the posts (and I've seen the same information in other places) says to remove the System.map symlink and point it to the new System.map from the kernel I just installed. Is that something that needs to be done or can I leave it pointing to my 2.4.31 System.map? I'm going to leave the 2.4 kernel installed also and just add an option in lilo to boot the 2.6 kernel, so would I need to change that symlink each time I wanted to boot into a different kernel?

Thanks in advance,
Tim

win32sux 02-13-2006 12:55 PM

the System.map symlink is not necessary at all...

bmccrac02 02-13-2006 03:11 PM

questions about kernel 2.6 install
 
The only directory for which you need to have a fixed pathname is /boot, because that's where lilo writes its files. Multiple kernels can reside in their own directories, which can be anywhere. You tell lilo where to find them in /etc/lilo.conf.

Here's how I do it.

Under /boot I keep separate directories, each one containing a kernel, a System.map and the .config used to build it. Currently I have:

/boot/2.4.31/
/boot/2.6.13/
/boot/2.6.14/

The kernel I'm using is 2.6.14.7, located in /boot/2.6.14, and that directory's contents are:

vmlinuz-2.6.14.7
vmlinuz -> vmlinuz-2.6.14.7
System.map-2.6.14.7
System.map -> System.map-2.6.14.7
config-2.6.14.7
config -> config-2.6.14.7

Similarly with 2.6.13 and 2.4.31.

(With separate directories, version numbering and symlinks aren't needed -- I could have just a System.map, vmlinuz and config in each directory. I do it as above merely for the sake of information. And the configuration file isn't used for booting -- I keep a copy of it there just in case I lose the original.)

In /etc/lilo.conf I have an "image" for each of my kernels --

image = /boot/2.6.14/vmlinuz
label = Linux-2.6.14
...
image = /boot/2.6.13/vmlinuz
label = Linux-2.6.13
...
etc.

And near the top of lilo.conf I make "Linux-2.6.14" my default.

When I run "lilo" it scans all the kernel directories that it sees in lilo.conf's "image" sections and creates its files ("map", etc) in /boot. In my case these files are, of course, just above the kernel subdirs, which seems like a sensible arrangement.

Also, Slackware uses a boot-time penguin logo, and I keep it in /boot as well, with a symlink to it in each kernel subdirectory. (I don't know if these symlinks are necessary for the image to appear with each kernel; I haven't tried it without them.)

The above scheme keeps everything separate, so that I don't have to concern myself with what files "System.map" and "vmlinuz" are currently linked to now, or when I last ran lilo.

And it's easy to maintain -- eg, if 2.6.14.8 appears, I can (1) split /boot/2.6.14 into two subdirs, one for .7 and one for .8, and update the "images" in lilo.conf accordingly; or (2) get rid of .7 altogether and replace it with .8, making no change in lilo.conf.
(The first option is what I'd use for testing .8; the second for making it my "official" new 2.6.14 kernel.)

I hope you find this useful.

Bob McCracken


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