LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora
User Name
Password
Fedora This forum is for the discussion of the Fedora Project.

Notices


Reply
  Search this Thread
Old 06-07-2007, 07:45 AM   #1
odaeng78
LQ Newbie
 
Registered: Feb 2005
Location: Seoul, Korea
Distribution: Fedora 6
Posts: 10

Rep: Reputation: 0
Question Kernel Compile


Dear all.

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?

Thanks.

Last edited by odaeng78; 06-07-2007 at 07:47 AM.
 
Old 06-07-2007, 08:21 AM   #2
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
Are you sure you installed the kernel SRC rpm correctly?
http://www.mjmwired.net/resources/mj...html#kernelsrc
 
Old 06-07-2007, 08:30 AM   #3
trashbird1240
Member
 
Registered: Sep 2006
Location: Durham, NC
Distribution: Slackware, Ubuntu (yes, both)
Posts: 463

Rep: Reputation: 31
Are you sure you actually have the source code?

(remember that you'll be hearing from people who've made the same mistakes you might be making )

Joel
 
Old 06-07-2007, 08:59 AM   #4
weibullguy
ReliaFree Maintainer
 
Registered: Aug 2004
Location: Kalamazoo, Michigan
Distribution: Slackware 14.2
Posts: 2,815
Blog Entries: 1

Rep: Reputation: 261Reputation: 261Reputation: 261
As already asked, did you install the source rpm?

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."
 
Old 06-07-2007, 11:48 AM   #5
odaeng78
LQ Newbie
 
Registered: Feb 2005
Location: Seoul, Korea
Distribution: Fedora 6
Posts: 10

Original Poster
Rep: Reputation: 0
Thumbs up Interesting.. and was a great help..

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?

Last edited by odaeng78; 06-08-2007 at 05:39 AM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Why can't I compile this kernel module? (kernel: 2.6.8-powerpc Debian sarge) Lannix Linux - Hardware 5 05-01-2007 12:29 PM
How to restore out-of-box kernel settings if my kernel compile fails? brgr88 Slackware 8 04-18-2006 06:51 AM
upgraded kernel, won't let me compile kernel once Suspend2 patches are applied microsoft/linux Linux - Laptop and Netbook 3 10-02-2005 02:37 PM
Kernel Problems. Howto Compile a new kernel from 4.2 with backwards compatibility ? ShoCkwave Linux - General 2 06-19-2004 06:02 AM
Kernel 2.4.23 compile causes kernel panics on ATA RAID-1 (mirror) array Raptor Ramjet Slackware 3 12-18-2003 01:40 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Fedora

All times are GMT -5. The time now is 01:45 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration