LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Red Hat (https://www.linuxquestions.org/questions/red-hat-31/)
-   -   Red Hat custom Kernel compilation mini-How-To for Red Hat 8-9 (https://www.linuxquestions.org/questions/red-hat-31/red-hat-custom-kernel-compilation-mini-how-to-for-red-hat-8-9-a-91503/)

nidua18 10-09-2003 05:56 PM

I have some additional questions regarding the difference between kernel modules and compiling into kernel. For example: should the different ACPI modeules like processor, fan and battery be compiled into kernel or should those be set as modules and is there some kind of a referance document which specifies the correct setting for difftent options or is it just a “personal preferance” whether something will be a modele or part of the kernel.

And thank you for the great guide to comiling the kernel. I am firly new to linux and without this guide I would probably never attempt to compile my own kernel.

Thetargos 10-09-2003 08:23 PM

It is most adviseable to compile as many things as you can as modules, in that way, you can stop execution of that particular kernel code at run-time, by simply un-loading such a module, whereas compiled directly into the kernel, if the module fails, you most probably would have to re-boot your computer in order to get your system back to normality.

As for documentation, I''ve been unable to find more than that supplied by the kernel itself, either in the form of Help tid bits, or in the Dcumentation directory (which is, needless to say, adviseable for you to read).

Regarding your question about ACPI, compile just as modules... remember to keep your core kernel as light as possible.

saposmak 10-09-2003 10:43 PM

Thanks man...to remove the kernel I used the script you made on that other thread and it was easy as nothing... then I edited the grub.conf and now it's back to normality... btw, what do you advice redhat users to do when it comes to compiling or patching the kernel? should we just stick to the kernel available thru up2date (for some reason redhat upgrades kernels realllly slowly) and just compile any features we want onto the current kernel?

Thetargos 10-10-2003 11:42 AM

As a matter of fact, I only would recommnd any Red Hat user to compile their own Vanilla Kernel in the event that there are problems with the current official Red Hat kernel, you have either a device that is not working or it's working un-properly, or simply if you are (like me) a hard core gamer, who wants the most out of your system, and you simply like Red Hat way of things (you could always try another distributions, like Gentoo, for instance).

I really compile my own kernel due to two things: Some of my hardware works best with the most recent kernel drivers (needless to say that two versions behind wont help much), and because there are known issues with official Red Hat kernels and some gaming situations, most noticeably WineX and some old DXdraw games (StarCraft, WarCraft II, even Diablo; or Monkey Island 3, etc, etc); and you come to the conclusion it is because of a kernel problem that lags these processes and gives them less priority. Again Red Hat sacrifices speed for stability (which for most enterprise/Home users is OK, just not for gamers). That is why I compile my own kernels :)

under 11-02-2003 06:51 PM

Well i haven't try it all ready (it's too lait and in a few hours a have a school to go to) but, i can assure you i will make a kernel compilation next thing after school. I had a couple of failed recompilation of kernel my self (no sound, no 3d hardware acceleration, no 32 bit colour depth).

In short: YEAH, WE NEED THIS KIND OF POSTS! AND THANK YOU!

Thetargos 11-03-2003 03:24 PM

This was made with the hopes the users may find it useful! :D

Thynomalis 11-03-2003 04:09 PM

I've followed about 3 different kernel compiling guides and I thank you all for making them but whenever I try to run make xconfig, I get
Quote:

...
./tkparse < ../arch/i386/config.in >> kconfig.tk
make[1]: *** [kconfig.tk] Error 139
make[1]: Leaving directory '/usr/src/linux-2.4.22/scripts'
make: *** [xconfig] Error 2
I've tried while logged in as root as well as my normal user and I'm recompiling under redhat 9. I've search around on google and alittle on this forum but I'm pretty new to recompiling so my apologies if I overlooked the answer already.

Thetargos 11-03-2003 05:33 PM

I'd say to check your installation. Especially the tools tk/tcl, needed by the GUI when building with make xconfig. Depending on your istribution you may have or not a GUI tool for this:
On Red Hat 7x GnoRPM
on Red Hat 8-9 redhat-config-packages
You may also need to re-install those packages. To me the error is due to a misconfigured or not installed tk/tcl.

under 11-05-2003 06:22 PM

I finally had a first succes on compiling a kernel and i'm so very happy! Thank you Thetargos! I had many problems, even after reading all the things you said, but i finally managed to do it after i logged in as root from the begining, and compilled the kernel in the /usr/src directory. In any other combination... i failed (... and offcourse... that was the last one i tryied :D ). Was it the fact that i keep my users partition on different partition than the root one? I started to believe it is so. Maybe you could give me an answer, cause i got none other than this one. And ... come on... i gave the same commands every time (nobody can be that stupid...).

After many many hours off hard work and reading i managed to succesfully compile my kernel and include sound and after that to finally listen some music. If tommorow i manage to have my linux play some movies...then... a 60 GB partition goes to Linux.

Thank you all ( even if i have not mentioned you... i learned a lot by just reading your posts.)

Thetargos 11-05-2003 06:54 PM

Quote:

Originally posted by under
I finally had a first succes on compiling a kernel and i'm so very happy! Thank you Thetargos! I had many problems, even after reading all the things you said, but i finally managed to do it after i logged in as root from the begining, and compilled the kernel in the /usr/src directory. In any other combination... i failed (... and offcourse... that was the last one i tryied :D ). Was it the fact that i keep my users partition on different partition than the root one? I started to believe it is so. Maybe you could give me an answer, cause i got none other than this one. And ... come on... i gave the same commands every time (nobody can be that stupid...).

After many many hours off hard work and reading i managed to succesfully compile my kernel and include sound and after that to finally listen some music. If tommorow i manage to have my linux play some movies...then... a 60 GB partition goes to Linux.

Thank you all ( even if i have not mentioned you... i learned a lot by just reading your posts.)

You are welcome. And regarding you question, I also have my home partition appart from the main root (/) partition, and every attempt I have made to compile from there succeded... the problem to me is that you were taking all steps at the same time, so ofcourse the installation would fail, because it would need root priviledges to write into the /boot partition. In a future kernel build, you may try to compile just the modules (without installation) as a user and then just as root:
Code:

make modules_install install
Because both methods require writting to restricted sections (/boot and /lib/modules), I think that is why you were unable to compile as user ;)

under 11-06-2003 03:41 AM

Thought about it... not the case. Maybe even worse for an experienced linux administrator, i made all the steps as root (normal user then su ). Could this be becouse my everyday account is a normal one and doesn't have any special privileges (as your personal normal user might have). It's just a theory... i know i don't have the knowledges to have too much fait in what i'm thinking, so please reply one more time.

Thanks.

kuyalfinator 11-06-2003 09:29 PM

sweet!
 
Thanks for the mini-guide Thetargos!

Thetargos 11-06-2003 10:34 PM

Re: sweet!
 
Quote:

Originally posted by kuyalfinator
Thanks for the mini-guide Thetargos!
You are welcome! :D

Thetargos 11-06-2003 10:39 PM

Quote:

Originally posted by under
Thought about it... not the case. Maybe even worse for an experienced linux administrator, i made all the steps as root (normal user then su ). Could this be becouse my everyday account is a normal one and doesn't have any special privileges (as your personal normal user might have). It's just a theory... i know i don't have the knowledges to have too much fait in what i'm thinking, so please reply one more time.

Thanks.

I don't think so... but I would normally do this (from my home directory):
Code:

$ cd Kernel/linux-2.4.22
$ make xconfig
$ make [clean] dep modules bzImage
$ su
password:
# make modules_install install
# reboot

As I stated in the guide depends on what I'm doing if I clean the source tree or not, so assuming I'm re-compiling a currently running kernel, I'd alway clean the source tree (even though normally I would also clean it after installing the kernel), but since I most likely won't remember, I re-clean :) As a normal user that is how I do it. There were times when I had trouble by doing this, and instead of having the kernel in my home directory, I would simply download as user and then copy the .tar.bz2 to /usr/src and then re-do all as pure root (i.e ctrl+alt+F1, login as root, init 3, cd /usr/src/, tar-jxvf ..., cd ..., make menuconfig, etc, etc).

under 11-07-2003 05:43 AM

I never did the clean move... maybe that's it!

Anyway... now i have sound, i have movies, i have true color ... so ...bye bye win xp!The next step for me is to make another kernel compilation, one that would soothe my needs. So i'll keep what you said in mind.

Bye!
And thanks again.


All times are GMT -5. The time now is 03:22 PM.