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 Code:
make bzImage && make modules && make modules_install 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.... |
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.
|
Quote:
/sbin/mkinitrd /boot/initrd-what-do-i-put-here.img and-what-here I'm not following :confused: |
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.
|
Quote:
/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 I'm so nervous because the machine is "somewhere" and my job is "just upgrade it" :P |
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.
|
Quote:
I'm stupid :) Makefile says: VERSION = 2 PATCHLEVEL = 6 SUBLEVEL = 8 EXTRAVERSION = .1 so there is dot not dash.... aaaargh *getting grazy* |
Quote:
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.. |
Good luck!
|
Quote:
Code:
/sbin/mkinitrd /boot/initrd-2.6.8.1.img 2.6.8.1 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....? |
Problem solved, common typo :)
|
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.
|
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. |