Operating System - Linux
1830233 Members
2281 Online
109999 Solutions
New Discussion

Compiling Kernel - steps/procedure

 
Jagadesh
Frequent Advisor

Compiling Kernel - steps/procedure

Kindly tell me what is the exact procedure for compiling the kernel in Redhat.

Thanks
Jagadesh
4 REPLIES 4
Mark Grant
Honored Contributor

Re: Compiling Kernel - steps/procedure

Ok, I cant do this red hat specific because I haven't used red hat since 4.2 and it has changed a lot since then. I believe red hat make all their own mods but this is the procedure. I'll also assume you know which kernel options you want because that means you can get to use a GUI

cd /usr/src/linux (or wherever the red hat source is)

export DISPLAY=:0

make xconfig

enable all the things you want enabled

save and exit

make dep

make bzImage

make modules

make modules_install

cp /boot/vmlinuz /boot/vmlinuz.prev (you may need to adjust this name for red hat)

cp /boot/system.map /boot/system.map.prev

cp System.map /boot

cp arch/i386/boot/bzImage /boot/vmlinuz

edit /etc/lilo.conf or grub.conf

add an entry for booting vmlinuz.prev and your new kernel

run lilo (if using it)

cross fingers

re-boot.

If you want to keep all your existing configurations instead of starting from scratch then instean of "make xconfig" do a "make oldconfig" It's not very pretty but defaults to your exisiting config.



Never preceed any demonstration with anything more predictive than "watch this"
Sergejs Svitnevs
Honored Contributor

Re: Compiling Kernel - steps/procedure

Check out the official RedHat document:

http://www.europe.redhat.com/documentation/HOWTO/Kernel-HOWTO-2.php3

Regards,
Sergejs
Martin P.J. Zinser
Honored Contributor

Re: Compiling Kernel - steps/procedure

Also the README that comes with the Kernel sources pretty much spells out the process for you.
K.C. Chan
Trusted Contributor

Re: Compiling Kernel - steps/procedure

cd /src

make menuconfig
save the config
make bzImage
make modules
make modules_install
mv kernel to /boot/
edit grub.conf
reboot
Reputation of a thousand years can be determined by the conduct of an hour