For patching, connect to the Internet and do
# cd /usr/src
# tar czvf linux-2.2.6.tar.gz linux-2.2.6
# wget http://ftp.kernel.org/pub/linux/kernel/v2.2/patch-2.2.7.bz2
# bunzip2 patch-2.2.7.bz2
# patch -p0 -s < patch-2.2.7
# find . -name "*.rej"
# find . -name "*.orig"
# fine . -name "*.orig" | xargs rm
SU to root
Connect to net
Move to /usr/src
Gzip and tar the current kernel source tree
Get the required patch from the net
Bunzip the patch file
Apply the patch to the source tree
Find out if the patch failed with some file
Fine out about the patched file
Remove the saved original files if you want to patch up further
About recompiling the kernel
# cd /usr/src/linux
# make mrproper
# make config [just hit ENTER all way till you see the prompt again]
# make config or make menuconfig or make xconfig
# make dep or make depend
# make clean
# make zlilo or make zImage or make bzImage
# cd arch/i386/boot
# mv /vmlinuz /vmlinuz.old
# cp bzImage /vmlinuz
# vi /etc/lilo.conf
image=/vmlinuz.old
root=/dev/hda4
label=oldlinux
read-only
# lilo
# shutdown -r now
Go to /usr/src/linux
Make the kernel source fresh
Generate a conf file with the options selected by default
Configure
Make dependencies
Clean the tree
Build the kernel
Go to /usr/src/linux/arch/i386/boot where the kernel is kept
Save the old kernel
Replace the new kernel
Edit /etc/lilo.conf so you can boot old kernel if anything bad happens
Run lilo to reconfigure it
Reboot
Hope this helps.
On Thu, 16 Dec 1999, Shine Vijayan wrote:
> Hi,
>
> Can anybody provide me with information on how to create a custom
> kernel with all those source codes.
> Also i would like to have information on how to patch a linux kernel.
--------------------------------------------------------------------
The Linux India Mailing List Archives are now available. Please search
the archive at http://lists.linux-india.org/ before posting your question
to avoid repetition and save bandwidth.