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 just installed Fedora Core 3 and wanted to put my laptop to sleep, but I got an error message stating "No APM support in kernel". So I figure I would just rebuild the kernel.
However, when I went to the /usr/src directory I could not find the kernel sources. I even looked in /usr/local/src. The funny thing is I had Fedora install all packages and still no luck. Under /usr/src I see:
/usr/src/redhat/BUILD (no files)
/usr/src/redhat/RPMS (no files)
/usr/src/redhat/SOURCES (no files)
/usr/src/redhat/SPECS (no files)
/usr/src/redhat/SRPMS (no files)
Where in the heck is the kernel source code?
Do I need to get the Source RPM discs and install those?
In order to eliminate the redundancy inherent in providing a separate package for the kernel source code when that source code already exists in the kernel's .src.rpm file, Fedora Core 3 no longer includes the kernel-source package. Users that require access to the kernel sources can find them in the kernel .src.rpm file. To create an exploded source tree from this file, perform the following steps (note that <version> refers to the version specification for your currently-running kernel):
Obtain the kernel-<version>.src.rpm file from one of the following sources:
The SRPMS directory on the appropriate "SRPMS" CD iso image
The FTP site where you got the kernel package
By running the following command:
up2date --get-source kernel
Install kernel-<version>.src.rpm (given the default RPM configuration, the files this package contains will be written to /usr/src/redhat/)
where does it download it to?
i ran "up2date --get-source kernel" and it looked like it downloaded it but then i typed
"Install kernel-2.6.9-1.667.src.rpm" and also just rpm -
and here is what i get
[root@linuxbox ]# Install kernel-2.6.9-1.667.src.rpm
bash: Install: command not found
[root@linuxbox ]# rpm -i kernel-2.6.9-1.667.src.rpm
error: open of kernel-2.6.9-1.667.src.rpm failed: No such file or directory
No it's not a silly question. I don't understand why it has to be this involved
After you did the up2date and downloaded it,
Code:
cd /var/spool/up2date
rpm -ihv kernel-2.6.9-1.667.src.rpm
cd /usr/src/redhat/SOURCES
cp linux-2.6.9.tar.bz2 /usr/src
cd /usr/src
tar xfj linux-2.6.9.tar.bz2
There are some kernel config files inside /usr/src/redhat/SOURCES
just copy the appropriate config file into the /usr/src/linux-2.6.9 folder and rename it to .config
Last edited by benjithegreat98; 11-14-2004 at 07:17 PM.
THANKS! I (think) i'm set now...
I just wanted to write something in case anyone else reads this.
Quote:
----
There are some kernel config files inside /usr/src/redhat/SOURCES
just copy the appropriate config file into the /usr/src/linux-2.6.9 folder and rename it to .config
-----
I thought the commands given included this but i was wrong. so to anyone out there who didn't get it (i.e. me)
if you type
Code:
cd /usr/src/redhat/SOURCES
and then type ls to list your files you will see several files ending in .config for different architectures. i had no idea what architecture i had so i found on the web that in terminal you can type
Code:
uname -a
and listed in there you will see something like
Code:
Linux yourcomputername 2.6.9-1.667 #1 Tue Nov 2 14:41:25 EST 2004 i686 i686 i386 GNU/Linux
and so all those i686's meant the approprite file for me was kernel-2.6.9-i686.config . to copy you type
Code:
cp kernel-2.6.9-i686.config /usr/src/linux-2.6.9
and then rename it to .config i didn't find how to do in terminal so in the graphical browser i went to /usr/src/linux-2.6.9 and right clicked on the file and renamed it that way.
Looks like you're getting it all figured out. Just a tip: To rename a file on the command line type mv kernel-2.6.9-i686.config .config
To rename a file you must use the same command you would to move a file. When you are putting the destination to move to you just put the new name of your file.
I tired the "up2date --get-source kernel" method, and found it is not working correctly. My kernel was already updated. up2date gives an outdated kernel srpm. See below. Anybody knows how to correct this?
[root@gateway up2date]# uname -a
Linux gateway 2.6.9-1.681_FC3smp #1 SMP Thu Nov 18 15:19:10 EST 2004 i686 i686 i386 GNU/Linux
Just try the command again until you get the correct source. Whenever you use up2date it picks a random mirror. If the mirror is updated too late then you'll get the old source. If you try it a few more times you'll get the correct one eventually. If you wait a few hours your chance of getting the correct source increases.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.