FedoraThis forum is for the discussion of the Fedora Project.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I'm trying to practice kernel compiling, but facing many obstacles.
1. Isn't the source supposed to be in /usr/src/?
because my /usr/src/ is empty, but kernel-2.6.18-1....rpm IS indeed installed.
Where can I find the source for the existing kernel on my system?
(I mean I know I can find it from www.kernel.org)
2.Is there any detailed URL or anything helpful so that I can follow step by step and get myself used to the compiling process by repeating it many times?
AFAIK, if you use yum it will be installed in the /usr/src hierarchy. Looking at the instructions that mjmwired posted, it appears that is the case. Of course, the problem with the source being there is you have to be 'root' to build a new kernel. There's no need to be root to compile a kernel; it's not some sort of super-special code that requires elevated permissions. Fortunately, the kernel source code doesn't have to be there. You can put the source in your home directory or anywhere else you want (and have permissions).
The process is not so involved or difficult that you would need to repeat it over and over to "get used to it."
Before, I checked that kernel and kernel-headers were installed.
But I was missing kernel-devel which has no dependency with any other pkgs.
After I installed kernel-devel, I see /usr/src/kernels/2.6.18-1.2798.fc6-i686/ and bunch of stuff in that directory.
And mjmwired,
1. /usr/src/redhat/BUILD/kernel-2.6.18/ is the source dir? or is it something you get after doing rpmbuild?
cuz, I got directory named different like said above for the source.
2. and What do you mean by preparing the source? If it is not prepared, then I can't compile the kernel?
What does it preparing the source for?
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.