kernel compiling

Place to discuss Debian Linux and Debian based distributions
Post Reply
Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

kernel compiling

Post by Ice9 » Sat Aug 06, 2005 5:19 am

Is there some kind of tool which would alow me to compare the kernel parameters of an installed kernel (from a pre-built debian package) to whatever parameter I set for a fresh compiled kernel?

I just succesfully compiled my first kernel and while everything seems to work so far, it doesn't really boot much faster even if I unselected A LOT of unneeded things.
On top of that I now have a

Code: Select all

* /etc/init.d/alsa-utils: Warning: 'alsactl restore' failed with error message 'No state is present for card S51'. [ ok ]
error everytime I reboot or run alsactl restore, sound works fine though.
I ran alsaconf and the error persists.

Now I know I'm being picky here but I would rather not have to look at an error message when I really don't have to, besides an error message is a sure sign that something goes wrong somewhere, especially since I've never seen it before!

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Aug 06, 2005 5:53 am

I don't think you are going to save a lot of boot time by recompiling your kernel. The amount of time it takes to load the kernel on boot is a very insignificant amount of the entire boot process. When you configure a kernel to build there will be a file called ".config" in the kernel root. I don't have a Debian system up at my fingertips at the moment but on Red Hat systems the .config file used to build a prebuild kernel is included as /boot/config-2.6.xx-x.xxxxx so you can see what options are used. I don't recall for sure but I think Debian does something similar. You should be able to query the package and find the config. Just compare those two files to see what options are turned on and what modules are built.

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Sat Aug 06, 2005 9:55 am

:oops: the files were right under my nose in /boot like you said, found nothing shocking, didn't change a thing and now the error is gone, go figure ...

Void Main wrote:
I don't think you are going to save a lot of boot time by recompiling your kernel. The amount of time it takes to load the kernel on boot is a very insignificant amount of the entire boot process.
I thought that if one would make the kernel load less modules at startup, the boot process would be much faster.

When I boot I see a lot, and I mean A LOT - of messages like
blahblah already loaded
blahblah already loaded
blahblah already loaded
blahblah already loaded
WARNING: thismessagescrollsbysofastthatnobodycouldeverreaditbuthereitisanyway
soyoucanscratchyourheadtheentireeveningwonderingwhatitcouldmean.

So I thought that by disabling everything that wasn't really necessary I would decrease the boot time.

User avatar
Void Main
Site Admin
Site Admin
Posts: 5716
Joined: Wed Jan 08, 2003 5:24 am
Location: Tuxville, USA
Contact:

Post by Void Main » Sat Aug 06, 2005 10:22 am

Well only modules for the hardware you have should get loaded. It may try to load the other modules to determine if your hardware is present. You could move unused modules out of /lib/modules/`uname -r`/* and then "depmod -a" but there are probably better ways to do it. On Fedora it only takes a few seconds for this part of the boot (loaded from rc.sysinit). Not sure why Debian would take that much longer. Might also be able to modify the init scripts if you have to.

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Sat Aug 06, 2005 11:06 am

Well, the pre-built kernels I can install from the repositories load modules for loads of hardware I don't have like Ati chipsets, Sis chipsets, Cyrix stuff and I can't rmmod them.
This is why I initially wanted to compile a custom kernel.

Ice9
guru
guru
Posts: 577
Joined: Thu Jan 09, 2003 12:40 am
Location: Belgium
Contact:

Post by Ice9 » Sat Aug 06, 2005 4:58 pm

Hmmm, got another problem here.
I downloaded kernel 2.6.12.3 from http://www.scarlet.lkams.kernel.org/pub ... rnel/v2.6/
and it compiled ok.
Now I want to build the nvidia driver for my new kernel and I can't because I don't have the kernel-headers installed and I can't find them anywhere ... :?:

Post Reply