views:

271

answers:

3

Hi all.. i am working in Fedora OS.. actually i am working in windows and running fedora through VMware (as u all know, VMware is used to load the OS image, thus running a different OS being in one OS).. by default the kernel source tree should be in usr/src/ directory.. instead i could find only an empty directory called kernels.. the actual source code is missing there.. when browsing i found it might be in other directories like /boot..but i couldn't find source tree there also.. I need to modify system call tables for which i should be able to access those source codes.. please help me with this..

+2  A: 

You probably need to install the kernel-devel package.

On Fedora, all of the software is managed through a system called the Red Hat Package Manager (RPM). Every file (other than user data and other transient files like logs and such) is "owned" by a package. The ls command is from coreutils, the kernel is probably from kernel and BZFlag (the greatest Linux game ever) is provided by the bzflag package.

In the good old days, you would try to install software by using the rpm command (type "man rpm" for more information) and giving it the path to an RPM file that you had downloaded. The rpm command would then dutifully respond by informing you that you first need to satisfy 33 prerequisites. Then you would go download those 33 prerequisites and try to install them, only to find that each of those had their own prerequisites. And so on.

These days, Fedora has a nice set of online repositories of packages (and you can add others for third party software), and a program called yum that can download databases of all the packages, and you tell yum "install package foo for me" (by typing something like "yum install kernel-devel") and it goes and figures out that in order to install that package, you need a bunch of other prerequisite packages, and so on. It then automatically downloads and installs everything you need, and away you go. For more information on the various incantations that make yum go, see "man yum").

Adam Batkin
What is that actually.. can u brief on that
inquisitive
Most GNU/Linux distributions include a system that lets you add, manage, and remove bundles of software (called "packages"). I believe Fedora uses the RPM Package Manager. It should be able to fetch the software from the internet for you automatically.
Artelius
+2  A: 

Kernel source is not installed by default. You can follow e.g. the instructions here to install the source and build your kernel.

moonshadow
A: 

You might only need kernel-headers, depending what exactly it is you are doing, building drivers normally only requires the headers.

I found this page which may be of use to you Complete Fedora Kernel Headers It mentions that the 'kernel-devel' package doesn't include everything. (that would be just too simple!) It also tells you exactly how to use the rpm package handler.

You can, (I have tried this years ago, although I use Gentoo now), just download an archive from kernel.org and unpack it in /usr/src, but then you would have a 'vanilla' kernel without the Fedora patches.

Chris Huang-Leaver
404 - cannot find server
Shannon Nelson
It's there now. I just followed the link. Down votes just because someone else's website is offline for short time is a bit harsh.
Chris Huang-Leaver