|
Next: [gentoo-user] Thanks and bye for now
|
| Author |
Message |
External

Since: Aug 20, 2005 Posts: 165
|
(Msg. 1) Posted: Sat Dec 27, 2008 8:20 pm
Post subject: [gentoo-user] kernel config hell Archived from groups: linux>gentoo>user (more info?)
|
|
|
Summary of request for help:
Are there hardcore kernel builders in the house who can steer me to
a faster way of figuring out what the installed modules do... for
sure.
Details:
I'm at a point where any pared down kernel config I've built and tried
has some terrible thing wrong with it. Usually involving udev and
openrc someway or other... things not getting started or mounted etc
etc.
A full on genkernel build seems to be the quickest way to get a working
kernel. That done, I'm now plodding along with build after build
trying to discover what it is the genkernel has that my pared down
versions do not.
Trying to discover what all the 80 or so installed modules do seems
like a really slow process. Take the module name and try to find
something like it in .config
I've even written a perl script to allow me to input the module names,
or parts thereof and grep out the section name and lines that match inside
..config.
This is at least a weak start at knowing what the module is about.
I'd think there would be some kind of cross reference somewhere that
would connect module names to what they do, and what .config options
are associated.
Another path is to find the *.ko names in /lib/modules and use the
absolute name to track them down in the kernel sources where there is
usually a README of some sort in the tree leading to the *.ko.
But my god what a slow and painful way to find out what these modules
do.
Just rmmod is another way but again a very slow and painful way.
Maybe a module is used only occasionally and rmmodding may not show
what it was for right away. What ever fails may not happen
immediately. |
|
| Back to top |
|
 |  |
External

Since: Oct 27, 2006 Posts: 289
|
(Msg. 2) Posted: Sat Dec 27, 2008 8:40 pm
Post subject: [gentoo-user] Re: kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Harry Putnam wrote:
> Summary of request for help:
>
> Are there hardcore kernel builders in the house who can steer me to
> a faster way of figuring out what the installed modules do... for
> sure.
Well, my bit of wisdom here: Don't use modules. Do a "make
menuconfig", disable everything you don't need, and compile everything
you need in-kernel instead of as a module. |
|
| Back to top |
|
 |  |
External

Since: Oct 27, 2006 Posts: 289
|
(Msg. 3) Posted: Sat Dec 27, 2008 9:10 pm
Post subject: [gentoo-user] Re: kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Dirk Heinrichs wrote:
> Am Samstag, 27. Dezember 2008 20:27:37 schrieb Nikos Chantziaras:
>> Harry Putnam wrote:
>>> Summary of request for help:
>>>
>>> Are there hardcore kernel builders in the house who can steer me to
>>> a faster way of figuring out what the installed modules do... for
>>> sure.
>> Well, my bit of wisdom here: Don't use modules. Do a "make
>> menuconfig", disable everything you don't need, and compile everything
>> you need in-kernel instead of as a module.
>
> I'd say the "disable everything you don't need" part is what Harry's mail is
> all about.
Well, finding out what every installed module does isn't going to help
anyway. I'd start with only the modules currently used after a fresh
boot (lsmod). If you compile those in-kernel, it will boot. Everything
else can be tweaked later. |
|
| Back to top |
|
 |  |
External

Since: Aug 20, 2005 Posts: 165
|
(Msg. 4) Posted: Sat Dec 27, 2008 9:50 pm
Post subject: [gentoo-user] Re: kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Nikos Chantziaras <realnc.TakeThisOut@arcor.de> writes:
[...]
>>> Well, my bit of wisdom here: Don't use modules. Do a "make
>>> menuconfig", disable everything you don't need, and compile
>>> everything you need in-kernel instead of as a module.
>>
>> I'd say the "disable everything you don't need" part is what Harry's
>> mail is all about.
>
> Well, finding out what every installed module does isn't going to
> help anyway. I'd start with only the modules currently used after a
> fresh boot (lsmod). If you compile those in-kernel, it will boot.
> Everything else can be tweaked later.
Yeah, I talked about that in OP. But the only kernel I've got working
at the moment is a genkernel and it installs 80+ modules.
rmmoding my way through those is what lead to my post. Some indicate
they are in use but I can see they aren't related to things I actually
need. Digging that bit of info up is what I've been talking about.
> Dirk Heinrichs <dirk.heinrichs.TakeThisOut@online.de> writes:
> What could help you here is a "make xconfig". It's similar to "make
> menuconfig" but has a nice QT user interface. I would recommend to
> browse through it once and look at the help texts which are shown in
> the lower right pane for each option you klick. Based on this
> information, you can then decide wether or not to enable that option
> or even compile it as module.
I have looked at that before but didn't think it was any better than
`menuconfig' and the '/' help tool.
Many times the help provided doesn't really explain what a given
setting does. In fact in most cases it does not.
What is really aggravating is that it doesn't even really tell you
what exact thing in .config is being set with the various hundreds of
options. I mean when you do set something, you don't really get to see
what is being set inside of .config.
I don't have X running currently so its a mute point, but is the help
provided in xconfig and different than that available in `menuconfig'?
>> Details:
>> I'm at a point where any pared down kernel config I've built and
>> tried has some terrible thing wrong with it. Usually involving udev
>> and openrc someway or other... things not getting started or
>> mounted etc etc.
>
> With udev, those things usually work automatically. However, you
> must make sure that everything needed for accessing the root
> filesystem must be compiled into the kernel. That usually includes
> the driver for the chipset that operates your harddisks, harddisk
> support and the filesystem used for /.
>
>> I'd think there would be some kind of cross reference somewhere that
>> would connect module names to what they do, and what .config options
>> are associated.
>
> I don't know of any. But in most cases, the module name is listed in
> the help text.
>
>> Another path is to find the *.ko names in /lib/modules and use the
>> absolute name to track them down in the kernel sources where there is
>> usually a README of some sort in the tree leading to the *.ko.
>
> Somtimes, you can also simply guess by module name, for example:
> joydev.ko -> Joy(stick)Dev(ice).
>
>> But my god what a slow and painful way to find out what these
>> modules do.
>
> Yes, that's true. The browsing method may give you a rough overview
> within an hour or two.
>
>> Just rmmod is another way but again a very slow and painful way.
>> Maybe a module is used only occasionally and rmmodding may not show
>> what it was for right away. What ever fails may not happen
>> immediately.
>
> Or try modprobe + dmesg instead. Usually a driver module tells
> wether it has found some pice of supported hardware or not.
Now that is a good piece of advice there... I did notice that rmmoding
and modprobing can give you more info than you expect if you hit
something that the module latches onto.
I'm finding somewhat rough sledding in dmesg too. I find the ethernet
stuff with no problem and, by now, know what I need there.
My hardware is pretty common stuff, not even any sata discs, all ata.
and I'm still not sure which driver is needed there.
On the last attempted kernel, I just went menuconfig on a copy of the
genkernel .config and turned off a number of things I was pretty sure
didn't apply to me (all wireless for example) or anything but ethernet
under the network section. All firmware turned off.
Stuff I've never needed before.
Every thing mounted but still no network was started or any of the
stuff listed in `rc-update show'.
I was dumped out into a root shell where I was able to modprobe and
'/etc/init.d/bla start' my way into a fully running system.
So the stuff was there but something (I suspect udev) blocked it
starting up like it should.
At the same time a genkernel built kernel just boots as expected so
clearly something was turned off that shouldn't have been.
Right now my dmesg is clogged up with stuff since bootup so I'm going
to reboot the genkernel built kernel and have a close look at dmesg
(again for the 10th time ..) rmmod and modprobe and see what I find. |
|
| Back to top |
|
 |  |
External

Since: Oct 27, 2006 Posts: 289
|
(Msg. 5) Posted: Sat Dec 27, 2008 10:10 pm
Post subject: [gentoo-user] Re: kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Harry Putnam wrote:
> Nikos Chantziaras <realnc.RemoveThis@arcor.de> writes:
> [...]
>
>>>> Well, my bit of wisdom here: Don't use modules. Do a "make
>>>> menuconfig", disable everything you don't need, and compile
>>>> everything you need in-kernel instead of as a module.
>>> I'd say the "disable everything you don't need" part is what Harry's
>>> mail is all about.
>> Well, finding out what every installed module does isn't going to
>> help anyway. I'd start with only the modules currently used after a
>> fresh boot (lsmod). If you compile those in-kernel, it will boot.
>> Everything else can be tweaked later.
>
> Yeah, I talked about that in OP. But the only kernel I've got working
> at the moment is a genkernel and it installs 80+ modules.
The way I do it, is to simply know what hardware is in the machine
(dmesg, lspci and hwinfo for things I'm not sure about) and look for it
in the kernel configuration. For the few modules that remain where I
don't know what they do, I just google their names. The important stuff
is just the PATA/SATA controller, SCSI disk support and keyboard/mouse
though. The rest I add later. |
|
| Back to top |
|
 |  |
External

Since: Dec 27, 2008 Posts: 1
|
(Msg. 6) Posted: Sat Dec 27, 2008 11:40 pm
Post subject: Re: [gentoo-user] Re: kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
I would suggest to follow the Gentoo handbook first.
Leave all options you are not sure as default, using lspci to find out
more about your hardware specifications.
From my experiences I will make sure that the kernel is bootable first
then adapt it to hardware later. Use modules or not is your choice, both
ways work fine.
If you want to make sure that thing is stable, you can back up your old
config later then have a bunch of test kernels to test. The help from
kernel config interface does help you to get a general idea about what
is the purpose of the option.
Not everyone can get the kernel work for the first try, do not panic.
Once you get through the first time, thing will go more smoothly than
you thought. It happened to me one year before but now it take me about
less than 10 minutes to have the new kernel configured in my computer.
Good luck, |
|
| Back to top |
|
 |  |
External

Since: Aug 20, 2005 Posts: 165
|
(Msg. 7) Posted: Sun Dec 28, 2008 12:20 am
Post subject: [gentoo-user] Re: kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Nikos Chantziaras <realnc.TakeThisOut@arcor.de> writes:
> Harry Putnam wrote:
>> Nikos Chantziaras <realnc.TakeThisOut@arcor.de> writes:
>> [...]
>>
>>>>> Well, my bit of wisdom here: Don't use modules. Do a "make
>>>>> menuconfig", disable everything you don't need, and compile
>>>>> everything you need in-kernel instead of as a module.
>>>> I'd say the "disable everything you don't need" part is what Harry's
>>>> mail is all about.
>>> Well, finding out what every installed module does isn't going to
>>> help anyway. I'd start with only the modules currently used after a
>>> fresh boot (lsmod). If you compile those in-kernel, it will boot.
>>> Everything else can be tweaked later.
>>
>> Yeah, I talked about that in OP. But the only kernel I've got working
>> at the moment is a genkernel and it installs 80+ modules.
>
> The way I do it, is to simply know what hardware is in the machine
> (dmesg, lspci and hwinfo for things I'm not sure about) and look for
> it in the kernel configuration. For the few modules that remain where
> I don't know what they do, I just google their names. The important
> stuff is just the PATA/SATA controller, SCSI disk support and
> keyboard/mouse though. The rest I add later.
Sounds like a plan... thanks. Maybe eventually some of that output
will be a little easier. Here I just mean dmesg... lspci is easy
enough.
I must need some specific package to see hwinfo. Its unknown
to bash here. |
|
| Back to top |
|
 |  |
External

Since: Aug 06, 2004 Posts: 103
|
(Msg. 8) Posted: Sun Dec 28, 2008 1:50 am
Post subject: Re: [gentoo-user] Re: kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
On Saturday 27 December 2008 10:48:19 am Harry Putnam wrote:
> Nikos Chantziaras <realnc.DeleteThis@arcor.de> writes:
>
>
> [...]
>
> >>> Well, my bit of wisdom here: Don't use modules. Do a "make
> >>> menuconfig", disable everything you don't need, and compile
> >>> everything you need in-kernel instead of as a module.
> >>
> >> I'd say the "disable everything you don't need" part is what Harry's
> >> mail is all about.
> >
> > Well, finding out what every installed module does isn't going to
> > help anyway. I'd start with only the modules currently used after a
> > fresh boot (lsmod). If you compile those in-kernel, it will boot.
> > Everything else can be tweaked later.
>
> Yeah, I talked about that in OP. But the only kernel I've got working
> at the moment is a genkernel and it installs 80+ modules.
>
> rmmoding my way through those is what lead to my post. Some indicate
> they are in use but I can see they aren't related to things I actually
> need. Digging that bit of info up is what I've been talking about.
>
> > Dirk Heinrichs <dirk.heinrichs.DeleteThis@online.de> writes:
> >
> > What could help you here is a "make xconfig". It's similar to "make
> > menuconfig" but has a nice QT user interface. I would recommend to
> > browse through it once and look at the help texts which are shown in
> > the lower right pane for each option you klick. Based on this
> > information, you can then decide wether or not to enable that option
> > or even compile it as module.
>
> I have looked at that before but didn't think it was any better than
> `menuconfig' and the '/' help tool.
>
> Many times the help provided doesn't really explain what a given
> setting does. In fact in most cases it does not.
>
> What is really aggravating is that it doesn't even really tell you
> what exact thing in .config is being set with the various hundreds of
> options. I mean when you do set something, you don't really get to see
> what is being set inside of .config.
>
> I don't have X running currently so its a mute point, but is the help
> provided in xconfig and different than that available in `menuconfig'?
>
> >> Details:
> >> I'm at a point where any pared down kernel config I've built and
> >> tried has some terrible thing wrong with it. Usually involving udev
> >> and openrc someway or other... things not getting started or
> >> mounted etc etc.
> >
> > With udev, those things usually work automatically. However, you
> > must make sure that everything needed for accessing the root
> > filesystem must be compiled into the kernel. That usually includes
> > the driver for the chipset that operates your harddisks, harddisk
> > support and the filesystem used for /.
> >
> >> I'd think there would be some kind of cross reference somewhere that
> >> would connect module names to what they do, and what .config options
> >> are associated.
> >
> > I don't know of any. But in most cases, the module name is listed in
> > the help text.
> >
> >> Another path is to find the *.ko names in /lib/modules and use the
> >> absolute name to track them down in the kernel sources where there is
> >> usually a README of some sort in the tree leading to the *.ko.
> >
> > Somtimes, you can also simply guess by module name, for example:
> > joydev.ko -> Joy(stick)Dev(ice).
> >
> >> But my god what a slow and painful way to find out what these
> >> modules do.
> >
> > Yes, that's true. The browsing method may give you a rough overview
> > within an hour or two.
> >
> >> Just rmmod is another way but again a very slow and painful way.
> >> Maybe a module is used only occasionally and rmmodding may not show
> >> what it was for right away. What ever fails may not happen
> >> immediately.
> >
> > Or try modprobe + dmesg instead. Usually a driver module tells
> > wether it has found some pice of supported hardware or not.
>
> Now that is a good piece of advice there... I did notice that rmmoding
> and modprobing can give you more info than you expect if you hit
> something that the module latches onto.
>
> I'm finding somewhat rough sledding in dmesg too. I find the ethernet
> stuff with no problem and, by now, know what I need there.
>
> My hardware is pretty common stuff, not even any sata discs, all ata.
> and I'm still not sure which driver is needed there.
>
> On the last attempted kernel, I just went menuconfig on a copy of the
> genkernel .config and turned off a number of things I was pretty sure
> didn't apply to me (all wireless for example) or anything but ethernet
> under the network section. All firmware turned off.
> Stuff I've never needed before.
>
> Every thing mounted but still no network was started or any of the
> stuff listed in `rc-update show'.
>
> I was dumped out into a root shell where I was able to modprobe and
> '/etc/init.d/bla start' my way into a fully running system.
>
> So the stuff was there but something (I suspect udev) blocked it
> starting up like it should.
>
> At the same time a genkernel built kernel just boots as expected so
> clearly something was turned off that shouldn't have been.
>
> Right now my dmesg is clogged up with stuff since bootup so I'm going
> to reboot the genkernel built kernel and have a close look at dmesg
> (again for the 10th time ..) rmmod and modprobe and see what I find.
Jumping in the middle here....
On a new platform I usually just use lspci and "cat /proc/cpuinfo". From that
I can determine what processor I have and what hardware is plugged into the
pci bus... then all I have to consider is what gets plugged into the usb,
firewire, parallel or serial ports... I've always rolled my own kernels and
find it quite rewarding impressing the newbies with my efforts.
That said... always keep two kernels around... one you KNOW works and the
other for fine tuning or testing.
Cheers and Merry Christmas.
--
*****************************************************************************
From the desk of:
Jerome D. McBride
17:44:45 up 10 days, 23:48, 5 users, load average: 0.74, 0.51, 0.36
***************************************************************************** |
|
| Back to top |
|
 |  |
External

Since: Sep 28, 2008 Posts: 96
|
(Msg. 9) Posted: Sun Dec 28, 2008 3:10 am
Post subject: Re: [gentoo-user] Re: kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
You may also want to try lspci -v. It shows you what modules the
hardware uses and it should be able to boot with those at least. Example:
00:02.2 USB Controller: nVidia Corporation nForce2 USB Controller (rev
a3) (prog-if 20 [EHCI])
Subsystem: ABIT Computer Corp. Device 1c02
Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 10
Memory at e0003000 (32-bit, non-prefetchable) [size=256]
Capabilities: [44] Debug port: BAR=1 offset=0080
Capabilities: [80] Power Management version 2
Kernel driver in use: ehci_hcd
The last line shows what modules my USB controller uses. Also, those
are compiled in even tho it shows them as modules.
Hope that helps.
Dale
 |
|
| Back to top |
|
 |  |
External

Since: Sep 28, 2008 Posts: 96
|
(Msg. 10) Posted: Sun Dec 28, 2008 3:20 am
Post subject: Re: [gentoo-user] Re: kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Harry Putnam wrote:
> Nikos Chantziaras <realnc.RemoveThis@arcor.de> writes:
>
>
>> Harry Putnam wrote:
>>
>>> Nikos Chantziaras <realnc.RemoveThis@arcor.de> writes:
>>> [...]
>>>
>>>
>>>>>> Well, my bit of wisdom here: Don't use modules. Do a "make
>>>>>> menuconfig", disable everything you don't need, and compile
>>>>>> everything you need in-kernel instead of as a module.
>>>>>>
>>>>> I'd say the "disable everything you don't need" part is what Harry's
>>>>> mail is all about.
>>>>>
>>>> Well, finding out what every installed module does isn't going to
>>>> help anyway. I'd start with only the modules currently used after a
>>>> fresh boot (lsmod). If you compile those in-kernel, it will boot.
>>>> Everything else can be tweaked later.
>>>>
>>> Yeah, I talked about that in OP. But the only kernel I've got working
>>> at the moment is a genkernel and it installs 80+ modules.
>>>
>> The way I do it, is to simply know what hardware is in the machine
>> (dmesg, lspci and hwinfo for things I'm not sure about) and look for
>> it in the kernel configuration. For the few modules that remain where
>> I don't know what they do, I just google their names. The important
>> stuff is just the PATA/SATA controller, SCSI disk support and
>> keyboard/mouse though. The rest I add later.
>>
>
> Sounds like a plan... thanks. Maybe eventually some of that output
> will be a little easier. Here I just mean dmesg... lspci is easy
> enough.
>
> I must need some specific package to see hwinfo. Its unknown
> to bash here.
>
>
>
>
emerge hwinfo should help with that.
Dale
 |
|
| Back to top |
|
 |  |
External

Since: Aug 20, 2005 Posts: 165
|
(Msg. 11) Posted: Sun Dec 28, 2008 3:30 am
Post subject: [gentoo-user] Re: kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Dale <rdalek1967 DeleteThis @gmail.com> writes:
> You may also want to try lspci -v. It shows you what modules the
> hardware uses and it should be able to boot with those at least. Example:
Well son-of-a-gun... that is nice. Thanks |
|
| Back to top |
|
 |  |
External

Since: Sep 28, 2008 Posts: 96
|
(Msg. 12) Posted: Sun Dec 28, 2008 3:50 am
Post subject: Re: [gentoo-user] Re: kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Harry Putnam wrote:
> Dale <rdalek1967.RemoveThis@gmail.com> writes:
>
>
>> You may also want to try lspci -v. It shows you what modules the
>> hardware uses and it should be able to boot with those at least. Example:
>>
>
> Well son-of-a-gun... that is nice. Thanks
>
>
>
>
Yea, thanks to whoever mentioned it a while back. I have no clue how I
remembered that command either. Usually, I forget if I haven't used it
in a while. That should also work from the CD as well in case someone
else should see the need to use it.
Also, keep in mind that you can search for the module in make
menuconfig. Hit the / key then type in the module name. Should show
the path to get to it as well.
Us old farts do have some tricks. LOL
Dale
 |
|
| Back to top |
|
 |  |
External

Since: Dec 29, 2008 Posts: 1
|
(Msg. 13) Posted: Mon Dec 29, 2008 4:10 pm
Post subject: Re: [gentoo-user] kernel config hell [Login to view extended thread Info.] Archived from groups: per prev. post (more info?)
|
|
|
Harry Putnam wrote:
> A full on genkernel build seems to be the quickest way to get a working
> kernel. That done, I'm now plodding along with build after build
> trying to discover what it is the genkernel has that my pared down
> versions do not.
>
Another good starting point for a working kernel configuration would be
the currently running kernel.
zcat /proc/config.gz >/usr/src/linux/.config
The catch is that the currently running kernel has to have been compiled
with the option to show its configuration. |
|
| Back to top |
|
 |  |
| Related Topics: | [gentoo-user] kernel config sharing - Hi all, I'm currently using suspend2-sources-2.6.16-r8 and I want to switch to xen-sources-2.6.16.28 kernel. What I want is to take kernel config from suspend2 and use it with xen kernel. How have I to do that when using genkernel for the kernel..
[gentoo-user] Kernel config when a symbol has disappeared - I'm currently using kernel 2.6.13. I tried to download newer versions, but using the same configuration leads to many warnings that claim that some symbols my .config talks about do not exist anymore. What can I do to find what should be changed? I trie...
[gentoo-user] .config/audacious/config is getting big! - Hi, I was wandering what is taking away my hdd space. Now I found: du -h .config/audacious/config 160G .config/audacious/config What is this file good for? I don't think a config file should be that big. Can I delete it without trouble? KH
[gentoo-user] webapp-config - Hi folks, could anyone give me a short tip, how to query which webapps should be upgraded (-> list of all webapps which have a newer version available) ? thx -- --------------------------------------------------------------------- Enrico Weigelt ...
[gentoo-user] alsa config problems - Hi all, I have done the alsa configuration before, so I am kind of at a loss as to why nothing is working. I believe that I followed the Gentoo Linux Alsa Guide to the letter, but it was confusing. I had difficulty figuring out which parts of the.. |
|
You can post new topics in this forum You can 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
|
|
|
|