LinuxQuestions.org
Visit Jeremy's Blog.
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 04-23-2005, 01:01 PM   #1
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Rep: Reputation: 30
specific question on updating the kernel


Hi

I've been reading guides on updating the kernel on FC3. Guides talk about first getting kernel.src.rpm. I want to download and compile the latest 2.6.X kernel, not recompile the 2.6.9 kernel that came with FC3. Do I still have to get this kernel.src.rpm before I compile the latest kernel? Or do i just download latest 2.6.x kernel to /usr/src/ and compile it like with any normal linux distro?

Thanks
 
Old 04-23-2005, 01:05 PM   #2
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
yes get the kernel code from kernel.org and compile that accordingly
 
Old 04-23-2005, 01:43 PM   #3
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Original Poster
Rep: Reputation: 30
yes - meaning get both kernel.src.rpm and lates 2.6.x kernel or just the latest 2.6.x? How do i get rid of the old 2.6.9 kernel and just have the latest one?

Thanks
 
Old 04-23-2005, 01:48 PM   #4
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
for that folow this thead

http://www.linuxquestions.org/questi...threadid=73436
 
Old 04-23-2005, 02:04 PM   #5
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Original Poster
Rep: Reputation: 30
I updated and recompiled the kernel in Slackware many times. That is reason why i've asked the questions i've asked. FC3 does not have the same /usr/src/ directory as Slack and from the guides on updating the kernel in FC3 i understood that the process is not the same as in Slack and the guides do not make it clear to me on how to remove the old kernel and whether have to get and install the kernel.src.rpm if i just want to compile and install the newly downloaded kernel.
 
Old 04-23-2005, 03:49 PM   #6
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
if u edit the Makefile

then u will get the modules installld in a diffent directory
then cp the bzimage and system.map to /boot with differnet name
after that u can make the initrd image then u can go on making an entry for that kernel in ur lilo.conf or grub.conf

regards
 
Old 04-24-2005, 03:58 PM   #7
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Original Poster
Rep: Reputation: 30
I have never yet succefully updated or recompiled a kernel in FC3.
FC3 is pain in the ass comparing to Slack for example.

I have never edited a Makefile. Where is it? What is system.map and why do I need to copy it to /boot? I never touched system.map in Slack and my grub doesn't have system.map mentioned in it. What is initrd and how do i make it?

Please could you at least point me to the right guide that explains my questions above and properly explains FC3 kernel compilation/recompilation and update becasue I could not find a satisfying guide yet.

Thanks
 
Old 04-24-2005, 10:22 PM   #8
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
hi there

then what steps are involved in the compiling of your kernel??

regards
 
Old 04-25-2005, 12:40 PM   #9
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Original Poster
Rep: Reputation: 30
Well, in Slack, I would unpack th kernel-2.6.x.tar.bz into /usr/src/ directory, then cd into /usr/src/linux-2.6.x.
After that,
make mrproper
make menuconfig (i don't bother copying the .config file), make
su -c 'make modules_install'
make install

Then, I copy the bzImage from /usr/src/.../boot directory into /boot directory and name it vmlinuz-2.6.x.

Edit the lilo.conf, then lilo to renew the LILO menu.
If i don't want the old kernel, then i just delete the /usr/src/oldkerneldir and delete the old vmlinuz image.

That is it, but in FC3 it is not that simple, for instance, what is that /usr/src/redhat dir for.
 
Old 04-25-2005, 01:44 PM   #10
masand
LQ Guru
 
Registered: May 2003
Location: INDIA
Distribution: Ubuntu, Solaris,CentOS
Posts: 5,522

Rep: Reputation: 69
so what if u want to again upgrade the kernel?
after you have unpacked that kernel code and made urself a kenrel
the next time u follow those commands and ,
make modules_install, will overwrite ur earlier modules

regards
 
Old 04-27-2005, 03:56 AM   #11
johnnydangerous
Member
 
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431

Rep: Reputation: 30
why do u have 2.4 kernel for your slack man? isn't it kind of old?
and I guess it will not overwrite the modules since it adds a prefix when u recompile
 
Old 04-27-2005, 09:32 PM   #12
mjmwired
Member
 
Registered: Apr 2004
Distribution: CentOS6, CentOS5, F16, F15, Ubuntu, OpenSuse
Posts: 620

Rep: Reputation: 39
In FC3 it is that simple. The 'make install' should copy all necessary files to '/boot' and add an entry into Grub. However if you are using 'lilo' with FC3, I am uncertain as to what the behaviour is. (Grub is the default for FC3.)

The '/usr/src/redhat/' directory is where Fedora compiles and saves its RPM's. So if you install the fedora kernel source by SRPM, it will end up in '/usr/src/redhat/BUILD/kernel-2.6.X'. The difference was that before it would end up in '/usr/src/linux-x.x.x'. Where you compile your kernel is irrelevant to the compile process, the only thing is that *some* Makefiles or applications default to looking for the kerne source in '/usr/src/linux' or something.

If you are installing a fresh kernel from kernel.org, then you do not need the kernel.src.rpm from FC, unless you require the .config file from it.

Removing a kernel requires editing out the lines from grub.conf (menu.lst) and removing the corresponding files in '/boot' as well as '/lib/modules'.

Also if you use Redhat/Fedora's kernel source, the Makefile/scripts will automatically add a prefix (ex: 2.6.9-prep) to prevent you from trashing the current kernel. I do not think the kernel.org Makefile/scripts do that.
 
Old 04-27-2005, 11:36 PM   #13
johnnydangerous
Member
 
Registered: Jan 2005
Location: Sofia, Bulgaria
Distribution: Fedora Core 4 Rawhide
Posts: 431

Rep: Reputation: 30
Quote:
If you are installing a fresh kernel from kernel.org, then you do not need the kernel.src.rpm from FC, unless you require the .config file from it.
what you mean some compiling processes need the source

also you just need a symlink to point /usr/src/ to .../redhat/build/..

and if you do a rpmbuild of the recompiled kernel or stock kernel in rpm then just rpm -e kernel-2.6.X to remove it
 
Old 04-30-2005, 11:26 AM   #14
hubabuba
Member
 
Registered: Jan 2002
Location: UK
Distribution: Slack 14.1
Posts: 193

Original Poster
Rep: Reputation: 30
Thanks for replying. Few questions though,

Why is initrd mentioned in grub and wht is it?

and johnnydangerous,

What do you mean by "rpmbuild of the recompiled kernel or stock kernel in rpm", what does this do?
 
  


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
Specific Distro Question kkatebian Linux - Distributions 8 10-02-2005 07:17 PM
Question about updating my kernel snjbrian SUSE / openSUSE 4 11-12-2004 11:50 AM
Question about updating Kernel shazam75 Linux - Newbie 3 10-08-2004 11:11 PM
Question on Updating Kernel and Boot Disk chadypu Slackware 2 09-19-2004 03:05 AM
A general and a specific question- USB again at_nikolov Linux - Hardware 1 07-03-2003 05:38 AM

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

All times are GMT -5. The time now is 12:38 PM.

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