View previous topic :: View next topic |
Author |
Message |
DArtagnan l33t
Joined: 30 Apr 2002 Posts: 942 Location: Israel, Jerusalem
|
Posted: Wed Jul 10, 2002 7:01 am Post subject: Kernel conflicts |
|
|
I had vanilla-sources then i decided to move to gentoo-sources but i couldn't load NVdriver so i did:
#emerge -C vanilla-sources
#emerge -C gentoo-sources
#emerge gentoo-sources
After the compilation, i did emerge nvidia-kernel and the response was:
can not find /lib/modules/2.4.18 ( vanilla )
Why is looking for vanilla? ( i emerged gento-sources )
Is there any config file? _________________ All for one and one for All
--
MACPRO machine... |
|
Back to top |
|
|
IWBCMAN Guru
Joined: 25 Jun 2002 Posts: 474
|
Posted: Wed Jul 10, 2002 10:17 am Post subject: |
|
|
you should probably check your kernel configuration.....
under "loadable module support"
uncheck "set version information on all module symbols"
and then recompile
just a reminder:
when (re)compiling the kernel one should at least follow the following steps:
cd /usr/src/linux
cp .config ~/
make mrproper
cp ~/.conifg ~/
make menuconfig
make dep && make clean bzImage modules modules_install
mount /boot
mv /boot/bzImage /boot/bzImage.someothername
cp /usr/src/linux/arch/i386/boot/bzImage /boot
umount /boot
reboot
this usually will resolve any module dependency problems...
If anything fails during this process, restart again at step 1, do not reboot until you know you have a correctly compiled bzImage in your /boot directory....if you are really adventurous you can edit your grub menu file /boot/grub/menu.lst and add a scond boot entry which point to your /boot/bzImage.someothername....that way if your newly compiled kernel doesn´t work right, you can fall back on the you had before.....
the only thing I know of which require compiled-in module object version information is oss......I have never neeed this option...
hope this helped..... |
|
Back to top |
|
|
DArtagnan l33t
Joined: 30 Apr 2002 Posts: 942 Location: Israel, Jerusalem
|
Posted: Wed Jul 10, 2002 10:34 am Post subject: |
|
|
IWBCMAN wrote: | you should probably check your kernel configuration.....
under "loadable module support"
uncheck "set version information on all module symbols"
and then recompile
just a reminder:
when (re)compiling the kernel one should at least follow the following steps:
cd /usr/src/linux
cp .config ~/
make mrproper
cp ~/.conifg ~/
make menuconfig
make dep && make clean bzImage modules modules_install
mount /boot
mv /boot/bzImage /boot/bzImage.someothername
cp /usr/src/linux/arch/i386/boot/bzImage /boot
umount /boot
reboot
this usually will resolve any module dependency problems...
If anything fails during this process, restart again at step 1, do not reboot until you know you have a correctly compiled bzImage in your /boot directory....if you are really adventurous you can edit your grub menu file /boot/grub/menu.lst and add a scond boot entry which point to your /boot/bzImage.someothername....that way if your newly compiled kernel doesn´t work right, you can fall back on the you had before.....
the only thing I know of which require compiled-in module object version information is oss......I have never neeed this option...
hope this helped..... |
Thanks for your post.
!!! i have no boot part !!!
so i did all steps u've said...
even i wanted to go back to vanilla and them it said :
can not find /lib/modules/2.4.19 ( gentoo )
so:
if i wanted to use vanilla it was looking for gentoo-sources and if i tryied to use gentoo-sources it was looking for vanilla.... _________________ All for one and one for All
--
MACPRO machine... |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Wed Jul 10, 2002 3:44 pm Post subject: |
|
|
IWBCMAN wrote: | under "loadable module support"
uncheck "set version information on all module symbols"
and then recompile |
That option allows you to share binary modules among different kernel versions. While I agree with you that the original poster probably doesn't need to have it set, I don't think it's causing this problem. Looking at the nvidia-kernel ebuild, it seems to draw its idea of which kernel version to compile against by asking portage, and portage seems to draw it from /usr/src/linux/include/linux/version.h, so I think the problem is that D'Artagnan had stale sources in /usr/src/linux. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
DArtagnan l33t
Joined: 30 Apr 2002 Posts: 942 Location: Israel, Jerusalem
|
Posted: Wed Jul 10, 2002 8:24 pm Post subject: |
|
|
rac wrote: | IWBCMAN wrote: | under "loadable module support"
uncheck "set version information on all module symbols"
and then recompile |
That option allows you to share binary modules among different kernel versions. While I agree with you that the original poster probably doesn't need to have it set, I don't think it's causing this problem. Looking at the nvidia-kernel ebuild, it seems to draw its idea of which kernel version to compile against by asking portage, and portage seems to draw it from /usr/src/linux/include/linux/version.h, so I think the problem is that D'Artagnan had stale sources in /usr/src/linux. |
How come stale? _________________ All for one and one for All
--
MACPRO machine... |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Wed Jul 10, 2002 8:31 pm Post subject: |
|
|
DArtagnan wrote: | How come stale? |
I meant that the kernel sources in /usr/src/linux at the time you tried to emerge nvidia-kernel apparently did not match the kernel you were running. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
IWBCMAN Guru
Joined: 25 Jun 2002 Posts: 474
|
Posted: Wed Jul 10, 2002 8:54 pm Post subject: |
|
|
DArtagnan,
sory if I responded to your question twice, in two different forums without noticiing it....
At any rate I had a similiar problem under SuSE. Everytime I mucked around with multiple different kernels, and even when I simply recompiled with/without SMP support I ended up with multiple module directories under /lib/moidules and this caused real severe headaches with the nvidia modules....I found myself sometimes trapped in a loop where I constantly was having to recompile and reinstall the drivers...I then started mucking around with the modules.dep directory by hand(major mistake....utterly pointless)...After switching to gentoo and frequenting these forums I discovered the "make mrproper" command...Being as it is that SuSE considers it beyond the range of the average linux user to ever have to (re)compile his kernel, this step was never mentioned anywhere in their books or in their forums...I do not pretend to understand all of the issues involved in such, yet since I have started using the above described procedure I have been able to successfully (re)compile my kernel several times without fear(oh shit ! where did all these unresolved depencencies come from). I am now (as of today) running two different kernels, so I may be confronted with this problem again...however the only thing that I know that required me to use "set kernel information on all module symbols" was OSS(the sound driver prg.) After reading RAC's response I now understand that this kernel option should enable one to (re)use modules with differing kernels...so maybe I will be confronted by this problem once again.....
Could it be that you need to follow the steps I listed, aside from the kernel option, in *each* of your kernel directories...."make mrproper" wipes out everything in your modules directories(and several other directories)...ie. like starting with a fresh install. It´s only a suggestion.....I think the "left-overs" residing in your module directories from previous compilations(ie. make modules_install) is what RAC means when he used the word "STALE"........but then again I might be wrong...... |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Wed Jul 10, 2002 9:15 pm Post subject: |
|
|
IWBCMAN wrote: | I think the "left-overs" residing in your module directories from previous compilations(ie. make modules_install) is what RAC means when he used the word "STALE" |
No, I was referring to the fact that the nvidia-kernel ebuild appears to decide what the current kernel is by looking at /usr/src/linux.
If you're talking about /lib/modules/2.4.17, /lib/modules/2.4.18, etc., it's perfectly OK to have several of these directories. Each kernel looks for its modules in /lib/modules/<version>, where <version> is cobbled together from the stuff at the top of the top-level Makefile in the kernel source tree. I believe it is precisely to facilitate doing what you are doing (having multiple kernels installed side-by-side) that these directories are separated out.
The "enable version numbering on modules" option is designed to deal with modules that are only available in binary form, and make it easier to just move the binary module object file around, rather than forcing the binary module provider to recompile and rerelease for every new kernel release. Some additional code is added to each module you compile when you turn this option on.
Regardless of the setting of CONFIG_MODVERSION, the modules for each specific kernel you compile will go in the appropriate subdirectory under /lib/modules. Usually the only time you have problems here is when you are trying to install two instances of the exact same versioned kernel side-by-side. In this case, it can be helpful to move /lib/modules/x.y.z temporarily to another directory before you make modules_install, so that if the new kernel doesn't work, you can at least restore the modules to the previous working state after booting from a rescue CD. _________________ For every higher wall, there is a taller ladder
Last edited by rac on Thu Jul 11, 2002 6:43 am; edited 1 time in total |
|
Back to top |
|
|
IWBCMAN Guru
Joined: 25 Jun 2002 Posts: 474
|
Posted: Wed Jul 10, 2002 9:44 pm Post subject: |
|
|
RAC,
thanks for the clarification....I think I am begiinning to understand what my previous problems were(as regard SuSE). If I understand you correctly ....
"I meant that the kernel sources in /usr/src/linux at the time you tried to emerge nvidia-kernel apparently did not match the kernel you were running."
now correct me if I am wrong(please)...the gist of this is that if I am maintaing multiple kernels at the same time, i have to boot each of them and follow the compilation steps which I listed in my other response(https://forums.gentoo.org/viewtopic.php?p=39118#39118) in order to eliminate these problems ....?
Perhap I am confusing two distinct issues here, which are unrelated...does this affect only the issue concerning modules not being found in /lib/modules/x.y.z ? or does it also apply to the issue of unresolved dependencies as regards the nvidia-kernel driver ? (ie. make mrproper seems to have eliminated my unresolved depencdies issues)...
You obviously understand this process in much greater detail that I do, please elaborate more fully when you respond...everyone profits in the end when we share our understanding with others. As is so often the case, those who have a deeper understanding of linux intricacies(and for that part almost everything which is somewhat involved) consider their own knowledge "common sense", because they have already gone through the process of trial-and-error to figure it out-for those (of us)who have not yet gotten through this process there is nothing "common-senscial" about such things("common-sense" is a post-hoc reflection). Although its tedious, and perhaps boring, fully elaborating our answers to questions posed in these forums helps many to avoid having to make all of the "same" mistakes in the never ending trial-and-error approach of learning.... |
|
Back to top |
|
|
rac Bodhisattva
Joined: 30 May 2002 Posts: 6553 Location: Japanifornia
|
Posted: Wed Jul 10, 2002 10:20 pm Post subject: |
|
|
You are probably going to regret asking me to be verbose
First, I should repeat the two rules of Unix adminstration (which I think I also saw quoted in these forums somewhere):
1. There is more than one way to do anything.
2. Someone always thinks your way is wrong.
So apply what you wish of this to your own situation. First off, let's ignore nvidia for a minute - it confuses things. Here's how I manage multiple kernel sources:
The easy situation - kernel versions are different:
You have /usr/src/linux-2.4.18 containing 2.4.18 sources, and /usr/src/linux-2.5.24 countaining 2.5.24 sources. You can move the symlink /usr/src/linux to point at either of these directories whenever you want. Let's say you already have 2.4.18 installed and running, so you should have /boot/bzImage and /lib/modules/2.4.18, and you now want to try running the 2.5 kernel.
I would first start by copying .config from linux-2.4.18 to linux-2.5.24, and then move the /usr/src/linux symlink to point to linux-2.5.24. Then I would run "make oldconfig", which will ask me new questions only, and get my .config into a state that "make menuconfig" is more likely to be happy with. I have been bitten in the past by major changes to the structure of kernel configuration that rendered just running "make menuconfig" on an old .config file fail to pick up important configuration options.
Then make dep and clean if you haven't done so (or are having problems), bzImage, modules and modules_install. modules_install will put your modules into /lib/modules/2.5.24, so they won't hurt your 2.4.18 kernel. I would rename /boot/bzImage to /boot/bzImage-2.4.18, and then copy the new bzImage to /boot/bzImage-2.5.24, and modify grub's boot.lst to allow booting either kernel. Now you can switch back and forth at will.
The hard case (two copies of the same kernel with different configuration options):
This case is nasty enough that if I really had to do this a lot, I would probably change the kernel's top-level Makefile to have some version number like 2.4.18-exp or something, so that the modules won't stomp on each other, but...
Set up two trees under /usr/src, say linux-2.4.18-safe and linux-2.4.18-exp. Change the /usr/src/linux symlink to point at your experimental tree, and build the kernel. However, before you make modules_install, move /lib/modules/2.4.18 to /lib/modules/2.4.18-safe. Somehow name both kernels things that don't conflict (bzImage-2.4.18-safe and bzImage-2.4.18-exp, maybe?), update your bootloader menu, and try your experimental kernel.
If it doesn't work, you can save yourself the step of recompiling the kernel when booted from a rescue CD by simply moving /lib/modules/2.4.18-safe back to /lib/modules/2.4.18 and choosing the safe kernel from your bootloader.
OK, now let's tackle nvidia. I think the easiest rule here is "before you emerge nvidia-kernel, make sure that /usr/src/linux contains the sources that were used to compile the kernel that is running now."
For our first example with the 2.4 and 2.5 kernel sources, you would need to reemerge nvidia-kernel twice - with the /usr/src/linux symlink pointing at each of linux-2.4.18 and linux-2.5.24 respectively. Only then will the nvidia module be built for each kernel. In the case of the nvidia-kernel ebuild, it doesn't matter which kernel is actually running, only what is sitting in /usr/src/linux.
Hope this is clearer - you make a good point that it is sometimes hard to know what is important to say and what is important to omit. _________________ For every higher wall, there is a taller ladder |
|
Back to top |
|
|
IWBCMAN Guru
Joined: 25 Jun 2002 Posts: 474
|
Posted: Thu Jul 11, 2002 12:16 am Post subject: |
|
|
RAC,
THANK YOU('')
your response has now been saved to my harddrive for future reference....If you only knew how many times I have pulled my hair out fighting with this........ |
|
Back to top |
|
|
fmalabre Guru
Joined: 19 Jun 2002 Posts: 376 Location: Chicago
|
Posted: Thu Jul 11, 2002 5:45 pm Post subject: |
|
|
Thanks for the info!
I used to do make menuconfig on my old config file, and indeed, I always had issues with that.
I just tried to use the make oldconfig first, and make menuconfig after, and it works great!
I hope my ACPI will work now... |
|
Back to top |
|
|
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|