Making A New Kernel

The most important thing thing in linux is the kernel. You can download the latest kernel source at www.linuxberg.org  The latest one is kernel 2.2.x. It can support multiple processor and DMA hard disk handling and all the IDE driver. Sound Card , SCSI and many other hardware must used the kernel to work.

your old kernel source should be in /usr/src/linux. You can move it to a different name by using this command :

mv /usr/src/linux /usr/src/linux-old

Now, uncompress the source file tat u have downloaded:

cd /usr/src

tar zxvf /your file location/kernel-2.2.3.tar.gz

It should take a while and you will see a long list of files being created.

now, we configure the kernel :

cd linux
make config

Tips : Don't enable things that you will never used.....it will make the kernel very big and waste your ram.  If you have doubt about something, just type help and it will give you some info.

After that,

make dep
make clean



ok , if you are booting from a floppy ( or want to ) , just do the following :

make zdisk

that's it


if u r booting from lilo, do this :

make zImage

your kernel will be at /usr/src/linux/arch/i386/boot/zImage

now , try to look for the file in /etc/lilo.conf
look for a line that look like this :

image=/boot/vmlinuz

now, yours one may look different. But the thing is that vmlinuz in /boot is the kernel file of your linux.

now, just copy the kernel that you have made over this old kernel :

cp /usr/src/linux/arch/i386/boot/zImage /boot/vmlinuz

your old kernel will be overwrite..

now run this command :

/sbin/lilo


now, u can also boot linux from msdos. the command is simple :

just copy the zImage file in /usr/src/linux/i386/boot/zImage to your msdos partition.

U can copy it this way :

1. Mount your msdos hard disk first ( example : mount /dev/hda1 /msdos )

2. Make a directory :   mkdir /msdos/linux

3. Copy it !  cp /usr/src/linux/arch/i386/boot/zImage /msdos/boot

Ok when you are in DOS, just copy your loadlin.exe to the c:\boot directory (loadlin.exe should be inside your distribution cd). Just use the following simple command to boot into linux

cd c:\boot
loadlin zimage



 Tips :

1.  When you do make zImage or make zdisk, you might get an 'error' telling you something not found......that maybe you configure it wrongly or you forgot to delete the old kernel source first.
 
2. If the make zImage or make zdisk tell you the kernel is too large,  try make bzImage