Kernel compilation

I have re-compiled kernel source code available in /usr/src/linux.2.4.20 with "make" command. The compilation is succesful.

Now the problem is create the image for this. The documentation in the same folder says that now you have compile "make image". There is no option for image in Makefile.

Somebody please help in creating the image & adding the same to grub for booting

I think it is now "make zImage" or similar.

have a look in

  1. /boot

  2. /boot/grub/menu.lst

Hi,
I am new to kernel compilation, i tried many time compiling linux kernel,
But most of the time i failed in doing it(lack of knowledge),If any body have a detailed HOW TO, which would be helpful for me to learn it

      I am getting compilation errors, and i dont know the exact problem as well to describe it here

Your experience would be helpful for me

Best Regards,
Rakesh UV

Hello All,

These are the steps i followed for compiling kernel 2.4.32, some times there may be some problems in the source files as well , so instead of wasting just download a stable source code again.. it will surely work...

--> Firstly in kernel compilation is configuring the kernel in case of 2.4 kernels...

  -->  enter make config  or make menuconfig \(i prefer that\)... or make xconfig..

 -->  then do a make bzImage \( as for now zImage is obsolete..\), this step creates the bootable kernel image. copy that to the /boot/ directory.

  -->  then do a make modules \( this would bake the modules\)
   
  -->   then as a root user do a make modules_install \( this would create a folder in /lib/modules/\(kernel version\) which would contain the modules..\)

  -->  Now the next thing u have to create a initrd image .. in the /boot directory, so

            \# cd /boot
             \# mkinitrd  initrd-2.4.32.img    [kernel version, 2.4.32]
     
   --> The last step would create the .img which is the initrd image.

    Now u have to edit the file /etc/grub/grub.conf  enter the lines

            /initrd      /boot/\(initrd img\)
            /kernel   /boot/bzImage \(the image of the kernel\).
           may be some entries of the root files system..
          /root      /dev/hda3 \( also some options u can enter..\)

--> Finally reboot the system and if every thing goes okay u will be see the option in the grub boot loader prompt, select it and enjoy.........

--> Currently lilo is less popular , but may be some one cud write steps for editing the lilo.conf

Regards,