how do i recompile my kernel (redhat 8; 2.4.18-14) after modifying base.c file in /usr/src/linux-2.4.18-14/fs/proc/base.c. This patch is meant to increase /proc/cmdline file to parse larger arguments and and it is applied by modifying base.c file. this is just a development machine for testing.
i have changed the base.c (made backup of the file as well) file and here's how I am trying to recompile:
- downloaded the kernel src
- rpm -Uvh kernel.src.rpm
- rpmbuild -ba /usr/src/redhat/SPECS/2.4.18.specs
- make mrproper
- make config
- make dep
- make clean
- make zImage
- make modules
- make modules_install
- modify grub for default kernel is the new kernel
- reboot
please help me if you have any helpful tips for me based on your previous experiences.
the aim is to update the machine using the same kernel with the patch.
will wait for your response deparately.
thank you so much!
recompiling kernel after manually applying the patch
recompiling kernel after manually applying the patch
Aziz Khawaja
Chicago, Il.
Chicago, Il.
saadi,
The sequence is essentially correct, however I have some suggestions to make.
The sequence is essentially correct, however I have some suggestions to make.
- Instead of zImage, make bzImage instead. bzImage builds smaller kernel images which helps because as I recall there's some kinda limitation on the size of the kernel image on the x86.
- Instead of setting the new kernel as the default outright, just add the new kernel image in lilo.conf, and run lilo -R <new_entry_name>. This will set the new kernel image as the default for the next boot. That way, if your box is in a remote location, if something goes horribly wrong on reboot and the new kernel refuses to boot, just ask someone with physical access to the box to reboot it. It'll boot back into the original one.
- In the makefile for the kernel, change the EXTRAVERSION parameter to something like -LCMD (long commandline). That way, the modules built won't overwrite the non-LCMD kernel modules
- Run depmod <new_kernel_version> to make sure the new modules are in the correction condition