Solved

separate modules-dir same kernel version how?

Posted on 2001-06-24
4
246 Views
Last Modified: 2010-04-20
Hi.
Say for instance I compile 2 kernel images, each same version, but different modules used in each.  If you have a modules directory with unused modules (at least in my experience) or modules compiled for a different image despite same kernel version, you get unresolved dependencies for those modules, and I hate, absolutely hate those errors dispite how harmless they may be.
I was informed that perhaps in theory I could have 2 separate system.map files each pointing to a different modules directory, but then how would I specify the different system.map file to be used with selected kernel through lilo?  

I guess the main question here is more referring to the different modules directory for each image (despite same version), than to the system.map...

Or, on a more generalized level, how to avoid these unresolved dependency errors.  I am only suspecting that it's because of different modules per image despite version, and am only suspecting that a different modules dir for each image resolving the problem.

Thank you.
Mike
"Checkbook!!"
0
Comment
Question by:Checkbook
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
4 Comments
 
LVL 40

Accepted Solution

by:
jlevie earned 250 total points
ID: 6226215
One solution, that works for sure on a RedHat system, is to modify the "EXTRAVERSION" define in the top level Makefile. Then save your .config file and "make mrproper". Restore the .config file and configure and build the kernel & modules in the normal manner. The modules dir will take on a name derived from the "VERSION", "PATHCHLEVEL", "SUBLEVEL", and "EXTRAVERSION" defines. You can copy the bzImage to vmlinux-????, where ??? is the same string as the modules install as. Likewise for the System.map. For example, on my 7.1 system I find:

VERSION = 2
PATCHLEVEL = 4
SUBLEVEL = 2
EXTRAVERSION = -2

in the makefile. The modules are installed in /lib/modules/2.4.2-2 and /boot contains:

System.map-2.4.2-2 -> System.map
vmlinux-2.4.2-2
vmlinuz-2.4.2-2    -> vmlinuz

If I were to change the Makefile so that "EXTRAVERSION = -test1" I'd have:

/lib/modules/2.4.2
/lib/modules/2.4.2-test1

System.map-2.4.2-2
System.map-2.4.2-test1
vmlinux-2.4.2-2
vmlinux-2.4.2-test1
vmlinuz-2.4.2-2
vmlinuz-2.4.2-test1

And I can make the symbolic links as desired. Of course you'd want to add an extra stanza to lilo.conf with a different label so that you could boot either of the kernels, perhaps something like:

image=/boot/vmlinuz-2.4.2-2
        label=linux
        read-only
        root=/dev/hda1

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

And if you need to use initrd you can make multiple versions of that with the same naming scheme.

I always do a "make mrproper" each time I change the Makefile to be sure that everything will be built in a consistant manner.
0
 

Author Comment

by:Checkbook
ID: 6226235
I hope somebody somewhere pays you guys good money because the knowledge you have is worth every penny.
Thank you.
I really appreciate this forum.  If it were fee-based information, I would pay it.

I have many more questions. :)  You know, I emailed RedHat support with the same question (I had their free 30 day support deal as I purchased their boxed set), and they told me that if I recompiled my kernel they no longer supported me, even though it was not a question about compiling - it was about modules - this same question.

Anyways, thanks again.  If I am knowledgeable on something I too will share it.
0
 

Author Comment

by:Checkbook
ID: 6226238
See previous comment.
0
 
LVL 40

Expert Comment

by:jlevie
ID: 6226287
Thanks for your most generous compliment. I'm always glad when I can help someone.
0

Featured Post

Use Case: Protecting a Hybrid Cloud Infrastructure

Microsoft Azure is rapidly becoming the norm in dynamic IT environments. This document describes the challenges that organizations face when protecting data in a hybrid cloud IT environment and presents a use case to demonstrate how Acronis Backup protects all data.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using 'screen' for session sharing, The Simple Edition Step 1: user starts session with command: screen Step 2: other user (logged in with same user account) connects with command: screen -x Done. Both users are connected to the same CLI sessio…
I. Introduction There's an interesting discussion going on now in an Experts Exchange Group — Attachments with no extension (http://www.experts-exchange.com/discussions/210281/Attachments-with-no-extension.html). This reminded me of questions tha…
Learn how to get help with Linux/Unix bash shell commands. Use help to read help documents for built in bash shell commands.: Use man to interface with the online reference manuals for shell commands.: Use man to search man pages for unknown command…
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.

756 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question