LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   specific question on updating the kernel (https://www.linuxquestions.org/questions/fedora-35/specific-question-on-updating-the-kernel-316426/)

hubabuba 04-23-2005 01:01 PM

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

masand 04-23-2005 01:05 PM

yes get the kernel code from kernel.org and compile that accordingly

hubabuba 04-23-2005 01:43 PM

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

masand 04-23-2005 01:48 PM

for that folow this thead

http://www.linuxquestions.org/questi...threadid=73436

hubabuba 04-23-2005 02:04 PM

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.

masand 04-23-2005 03:49 PM

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

hubabuba 04-24-2005 03:58 PM

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

masand 04-24-2005 10:22 PM

hi there

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

regards

hubabuba 04-25-2005 12:40 PM

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.

masand 04-25-2005 01:44 PM

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

johnnydangerous 04-27-2005 03:56 AM

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

mjmwired 04-27-2005 09:32 PM

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.

johnnydangerous 04-27-2005 11:36 PM

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

hubabuba 04-30-2005 11:26 AM

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?


All times are GMT -5. The time now is 02:33 PM.