Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED]GenkernelInstall after ManualKernelInstal NoModules
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Installing Gentoo
View previous topic :: View next topic  
Author Message
joseph knecht
n00b
n00b


Joined: 08 Jul 2012
Posts: 16

PostPosted: Tue Jul 17, 2012 6:14 pm    Post subject: [SOLVED]GenkernelInstall after ManualKernelInstal NoModules Reply with quote

Hello,

I am doing my first gentoo installation and I am playing a little bit around in order to explore the text mode environment and different kernel options. But now I have run into a problem and I would appreciate to get a little hint on this. What happened :

1.
First I did a manual installation of gentoo 3.1.12, upgraded to 3.2.21, intalled the framebuffer, learned to manually build an intramfs, etc. Everything worked fine. And when booting my manually configured kernel, all modules were loaded automatically (/etc/conf.d/modules beeing empty). Here the lsmod output I got at the time when everything still worked fine :
Code:
lsmod
Module                  Size  Used by
vboxsf                 26580  0
snd_intel8x0           19159  0
snd_ac97_codec         76427  1 snd_intel8x0
ac97_bus                 601  1 snd_ac97_codec
snd_pcm                43045  2 snd_intel8x0,snd_ac97_codec
snd_timer              12435  1 snd_pcm
snd                    34487  4 snd_intel8x0,snd_ac97_codec,snd_pcm,snd_timer
snd_page_alloc          4853  2 snd_intel8x0,snd_pcm
e1000                  75836  0
battery                 8443  0
i2c_piix4               6484  0
joydev                  6644  0
vboxguest             121377  2 vboxsf
sg                     19244  0
button                  3299  0
ppdev                   4058  0
parport_pc             23902  0
parport                20995  2 ppdev,parport_pc
ac                      2353  0
pcspkr                  1223  0


2.
I had no problems until I got the idea to install genkernel as 2nd kernel. In order to do this, I emerged my gentoo-sources again although I understand meanwhile that this wasn't necessary. Afterwards, I installed genkernel as described in the handbook. Booting the genkernel works fine too and I am having a very long lsmod output list (/etc/conf.d/modules still beeing empty).

3.
But, since I have installed genkernel, the lsmod list I get when booting my old manually configured kernel is nearly empty :
Code:
lsmod
Module                  Size  Used by
vboxsf                 26580  0
vboxguest             121377  2 vboxsf

I observe that only the virtualbox guest additions are loaded. For your info, loading of the virtualbox guest additions fails when booting the genkernel. - Probably because this kernel has not been configured accordingly.

4. My question : Why are the modules loaded automatically when booting the genkernel and why are they not loaded automatically anymore when booting the manually configured kernel?

Can anybody help me on this please?

Many thanks in advance.
_________________
Thanks for your feedback.


Last edited by joseph knecht on Wed Jul 18, 2012 2:21 pm; edited 1 time in total
Back to top
View user's profile Send private message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 487
Location: Sao Paulo, Brazil

PostPosted: Tue Jul 17, 2012 8:42 pm    Post subject: Reply with quote

Hi joseph knecht,
In the first and second issues you seem to be passing the initramfs to your kernel. In which case, it'll run every single module for hardware.
Doble check if you passed the initrd command to the kernel. The third case is exactly the contrary and the kernel is ruining the built-in modules only.
G'Luck

EDIT: if don't want such behavior, edit your /etc/modules.autoload.d/kernel-X.Y according to your needs (X.Y is your kernel version); or edit
your /etc/conf.d/modules if you want to run modules in a independent kernel manner.
Back to top
View user's profile Send private message
joseph knecht
n00b
n00b


Joined: 08 Jul 2012
Posts: 16

PostPosted: Tue Jul 17, 2012 9:31 pm    Post subject: Reply with quote

Hi ferreirafm,

Thanks for the good intention, but I think you are completely misinterpreting my post :

Quote:
In the first and second issues you seem to be passing the initramfs to your kernel

There are only 2 case I describe : the manually configured kernel and the genkernel. There is no 3rd case. I used the numbers to structure my text.
Furthermore, the behavior when booting the manually configured kernel is exactly the same with and without passing initramfs.

Quote:
The third case is exactly the contrary and the kernel is ruining the built-in modules only

This is just wrong. What you call the 3rd case is my genkernel. genkernel is booted with initramfs.

Kind regards,
_________________
Thanks for your feedback.
Back to top
View user's profile Send private message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 487
Location: Sao Paulo, Brazil

PostPosted: Tue Jul 17, 2012 10:19 pm    Post subject: Re: Genkernel Install after Manual Kernel Install - No Modul Reply with quote

Hi joseph,
I'm sorry, I've got lost with such a long post. Anyway... answering your question...
joseph knecht wrote:
Why are the modules loaded automatically when booting the genkernel and why are they not loaded automatically anymore when booting the manually configured kernel?

Can anybody help me on this please?

Many thanks in advance.

If you've used genkernel passing initramfs to it (following the Gentoo installation guide), every single module is going to be loaded. In the manual setting, you probably missed some kernel variables so that the modules are not automatically loaded anymore. In other words, pass the initrd command to your kernel do not means that your modules are going to be automatically loaded. So, review your .config file.
Indeed, there is no need to load everything, if are not going to use them. In this case, load your modules as suggested in my previous post.
G'Luck

EDIT: I, personally, prefer to load modules from modules.autoload.d


Last edited by ferreirafm on Wed Jul 18, 2012 12:56 pm; edited 1 time in total
Back to top
View user's profile Send private message
jburns
Veteran
Veteran


Joined: 18 Jan 2007
Posts: 1048
Location: Massachusetts USA

PostPosted: Wed Jul 18, 2012 3:48 am    Post subject: Reply with quote

If your manually built kernel and the genkernel are both the same version then the modules from the manual build may have been erased or overwritten by the genkernel build. Check the contents of /lib/modules/.
Back to top
View user's profile Send private message
joseph knecht
n00b
n00b


Joined: 08 Jul 2012
Posts: 16

PostPosted: Wed Jul 18, 2012 12:34 pm    Post subject: Re: Genkernel Install after Manual Kernel Install - No Modul Reply with quote

Hello ferreirafm,

First of all : Thanks for your help. My problem is solved. At this moment, all modules are loaded automatically again with either kernel.

But I am afraid I solved it without understanding really what happend and without understanding why it is solved now. I will have to do some reading in order to raise my level of understanding and also in order to valuate to the maximum some of your comments. This will take some time, but you pointed me to the right direction.

If I try to summarize what I still remember of my adventure, then I would say : I tried to load modules manually with modprobe, but I run into the error messages that the modules are not in the right format. At some moment I did something probably very stupid. Because I recompiled "a" kernel with "make && make modules_install" by using (without beeing aware) the genkernel .config. The resulting kernel did not boot at all because mounting of the root file system failed. After checking my kernel line (which was ok), I concluded that something very basic and stupid went wrong and I remembered your question about the .config file I am using. I recompiled my kernel again, this time using the correct historical manually configured .config and everything is solved. The modules are loaded under both kernels automatically.

My goal was to understand first what is going on before moving forward in order to implement your other advises like editing /etc/conf.d/modules or modules.autoload.d
I will still have to think this over before fully understanding what happened why exactly. But afterwards, I will start playing with these files. Because I still have to learn which module is actually used for what purpose.

The only point where I see clear at this moment as well as before is the initramfs. Actually I have never been running my manually configured kernel with the genkernel initramfs. I think this was a misunderstanding between us. Actually, I have 2 initramfs : the genkernel initramfs that I use only with genkernel and the manual initramfs that I use only with the manually configured kernel. This latter one does not take care of any modules.

So thanks once again. Gentoo is costing what I thought it is going to cost me. And it is leaning we what I want to learn. :lol:
_________________
Thanks for your feedback.
Back to top
View user's profile Send private message
ferreirafm
Guru
Guru


Joined: 28 Jul 2005
Posts: 487
Location: Sao Paulo, Brazil

PostPosted: Wed Jul 18, 2012 1:54 pm    Post subject: Reply with quote

Hi joseph knecht,
Congrats...
Sometimes it's very difficult to point out what exactly is wrong. There are hundreds of possible errors. We are limited just to give some directions when things are not obvious and generally we give answers based on several suppositions. From your side, it also is very difficult to find out what you did wrong. However, there is no doubt it's the best way to learn. Keep in mind that the Gentoo installation guide is only the first reading. So, go on for further literature. Here goes a more advance topic on kernels, which certainly will help you a lot.
Best,

P.S.: If you are done, put "[SOLVED]" in the beginning of your post header.
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Installing Gentoo All times are GMT
Page 1 of 1

 
Jump to:  
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