LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Fedora (https://www.linuxquestions.org/questions/fedora-35/)
-   -   Kernel compiling (https://www.linuxquestions.org/questions/fedora-35/kernel-compiling-218733/)

Teukka 08-17-2004 08:47 AM

Kernel compiling
 
Hi

I have compiled kernel in Debian boxes many times, but still I don't get howto do it in FC2 by the right way. Since 2.6.x kernels dont need make dep etc.

The machine is now in that condition how the installer lefts it (ookay i have updatet packages to newer versions) and i have downloaded the kernel source to /usr/src and unzipped it /usr/src/linux-2.6.8.1 directory and after that i have
run command
Code:

make menuconfig
and choosed what i need and after that compiled the kernel & modules whit no errors
Code:

make bzImage && make modules && make modules_install
So now I have the bzImage and System.map (and vmlinuz old is 1.3M and new is 3.3M?) files waiting for.. what?
Do I copy & link them like:

pwd
/usr/src/linux-2.6.8-1

mv arch/i386/boot/bzImage /boot/bzImage-2.6.8.1
mv System.map /boot/System.map-2.6.8.1
cd /boot
rm System.map
ln -s System.map-2.6.8.1 System.map

(how about the vmlinuz)

But how about the old initrd and vmlinuz files in /boot directory? what to do with them? Where do I get new initrd (vmlinuz)?

and finally the grub.conf... now the machine has boot images named like this:

kernel /vmlinuz-2.6.5-1.358smp ro root=/dev/md7
initrd /initrd-2.6.5-1.358smp.img


So can somebody give me good hints howto continue after compiling, I'v looked many pages but every page says so different things ? I'm totally confused....

cincindie 08-17-2004 12:51 PM

Just copy the bzImage file from the source directory into the boot directory, and name it as vmlinuz-version-name. you also have to do a mkinitrd /boot/initrd-version-name.img version-name to create the initrd image file. Don't worry about the old initrd and vmlinuz files. They don't take up that much space. Add the vmlinuz and initrd files you created to your grub.conf file. You should be all set.

Teukka 08-17-2004 02:19 PM

Quote:

Originally posted by cincindie
you also have to do a mkinitrd /boot/initrd-version-name.img version-name to create the initrd image file.
What do i extacly must type in this situation to make that initrd?

/sbin/mkinitrd /boot/initrd-what-do-i-put-here.img and-what-here

I'm not following :confused:

cincindie 08-17-2004 02:33 PM

You seem to be compiling kernel version 2.6.8-1. For this, type the following command: "mkinitrd /boot/initrd-2.6.8-1.img 2.6.8-1". That should produce the requisite initrd file. Your vmlinuz should be named as vmlinuz-2.6.8-1.

Teukka 08-18-2004 01:45 AM

Quote:

Originally posted by cincindie
You seem to be compiling kernel version 2.6.8-1. For this, type the following command: "mkinitrd /boot/initrd-2.6.8-1.img 2.6.8-1". That should produce the requisite initrd file. Your vmlinuz should be named as vmlinuz-2.6.8-1.
OK just one question more (hope just one), i typed accidentally wrong one point my first message.. I unzipped the new kernel to (default)

/usr/src/linux-2.6.8.1 not /usr/src/linux-2.6.8-1 directory so the vmlinuz prolly sould named anyway vmlinuz-2.6.8.1

Code:

mv arch/i386/boot/bzImage /boot/vmlinuz-2.6.8.1
or ?

I'm so nervous because the machine is "somewhere" and my job is "just upgrade it" :P

cincindie 08-18-2004 05:28 AM

No. It depends on the version mentioned in the first four lines of your Makefile in your linux source directory (in your case /usr/src/linux-2.6.8.1/Makefile). In your case, the version is 2, Patchlevel is 6, Sublevel is 8 and Extraversion is -1. Hence, it should be initrd-2.6.8-1.img. vmlinuz can be named anything as long as you refer to the proper image file in your grub.conf. For consistency sake, I'd name it vmlinuz-2.6.8-1 too.

Teukka 08-18-2004 06:00 AM

Quote:

Originally posted by cincindie
No. It depends on the version mentioned in the first four lines of your Makefile in your linux source directory (in your case /usr/src/linux-2.6.8.1/Makefile). In your case, the version is 2, Patchlevel is 6, Sublevel is 8 and Extraversion is -1. Hence, it should be initrd-2.6.8-1.img. vmlinuz can be named anything as long as you refer to the proper image file in your grub.conf. For consistency sake, I'd name it vmlinuz-2.6.8-1 too.

I'm stupid :) Makefile says:

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 8
EXTRAVERSION = .1

so there is dot not dash.... aaaargh *getting grazy*

Teukka 08-19-2004 01:47 AM

Quote:

Originally posted by Teukka
I'm stupid :) Makefile says:

VERSION = 2
PATCHLEVEL = 6
SUBLEVEL = 8
EXTRAVERSION = .1

so there is dot not dash.... aaaargh *getting grazy*


My solution is now to install testbox and have a try with it that thing and after i succeeded
move to that real critical machine..

cincindie 08-19-2004 04:57 AM

Good luck!

Teukka 08-20-2004 01:00 AM

Quote:

Originally posted by cincindie
Good luck!
nooooonow when I run:

Code:

/sbin/mkinitrd /boot/initrd-2.6.8.1.img 2.6.8.1
it says

No module ata_piix found for kernel 2.6.8.1, aborting.

no matter if I chooce it as module or * or without ??

lspci says
....
00:1f.2 IDE interface: Intel Corp. 82801EB (ICH5) Serial ATA 150 Storage Controller (rev 02)
....

So I think I need that module but how??

In menuconfig

Device Drivers --> ATA/ATAPI/MFM/RLL support --->

< > Intel PIIXn chipsets support is this the problem entry ??

Current lsmod says
...
ata_piix 9348 0
...

after running make bzImage && make modules && make modules_install
it says

if [ -r System.map ]; then /sbin/depmod -ae -F System.map 2.6.8.1; fi

what that means?

Like I before say Makefile's fourth line says .1 not -1 ( EXTRAVERSION = .1 )
so should I name bzImage vmlinuz-2.6.8.1 and also run initrd like i typed this message before....?

Teukka 08-20-2004 03:35 AM

Problem solved, common typo :)

mjmwired 08-23-2004 09:03 PM

Just curious, why didn't you try 'make install'? The makefile does everything for you. I've done this with 2.6.7 and 2.6.8.1.

Engmar 08-24-2004 12:49 AM

There is an alternative method, that won't be suitable for every environment - but as long as you are using an RPM based distro, you might look into taking advantage of your ability to compile and package your kernel with RPM.

Here is a link.


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