Archive for the ‘SYA710 -LAB4’ Category

Compiling the Linux Kernel

October 11, 2008

Compiling your Linux kernel allows you to customize your system and save a lot of resources (memory, cpu, etc..). Nowadays the Linux Operational System has support for everything, but I believe none of us have all of the supported hardware like for example “amateur radio”.

Then a good choice is to remove all the unnecessary modules. Removing unneeded stuff will allow you to have a smooth operational experience once your system will be so much faster just processing what is really need to be processed.

To build the kernel is necessary to have the package kernel-devel (yum install kernel-devel-`uname -r`).

#make oldconfig
Save your old configuration file in the file .config

#make mrproper

#make menuconfig
or
#make xconfig
Guide you to make the configuration file to be used in the compilation process

#make dep
Make dependencies

#make clean
Clean objects and other stuff leaved by the old kernel

After setting up all of your personal configurations, execute make compile the kernel.
#make

#make modules_install

create initial ram disk image
#mkinitrd -k vmlinuz-2.6.26 -i initrd-2.6.26

Update GRUB
#vi /boot/grub/menu.lst

#reboot

Links:
[1]http://zenit.senecac.on.ca/wiki/index.php/SYA710_Building_a_New_Kernel