APLawrence.com -  Resources for Unix and Linux Systems, Bloggers and the self-employed

Automated Kernel Recompilation

Web Site: http://www.geocities.com/avinashthegenius

Most people these days are very busy and so it becomes a pain to come back to the monitor everytime to see everystep of the kernel being compiled and then typing the appropriate commands like make to do the rest of the action. Welcome to The Automated Kernel Script ! Just configure your kernel and then have your kernel image automatically created with this script.

Copy this script below and save it as a file and run the script.



-----------------------------------------------------------------------------------------------
# Automated Kernel Recompilation By Avinash Shankar 
# Note: This was done under RH-7.3 so plz verify the paths
# Warning: Please run the Script under Xwindows

#going to kernel sources directory:
echo Entering Kernel Source Directory................
cd /usr/src/linux-2.4/

#Cleaning dep files and objs:
echo Cleaning up Junk files..................
make clean

#Configuring your New Kernel:
echo Entering Graphical kernel config.....................
make xconfig

#Making the dependencies files:
echo Making the dependecies ..................
make dep

#Backing up old module files
echo All your module files and system.map files backed up ................ 
mv /lib/modules/2.4.18-3/modules.dep modules.dep.old
mv /usr/src/linux-2.4/System.map System.map.old

#Make a compressed kernel:
echo Compressing the kernel image ..............................................
make bzImage

#Copy the Image to /boot directory
echo Copying the bzImage to /boot Directory......................................................
cp /usr/src/linux-2.4/arch/i386/boot/bzImage /boot

#Make the modules :
echo Compiling the Modules ...............................
make modules

#Make the Installable modules used by the new kernel
echo Making the modules executable ...................................
make modules_install

#copy the System.map file to /boot
echo Copying System.map file to /boot ....................................
cp /usr/src/linux-2.4/System.map /boot

echo Thats it you are finished ! Cool now edit the lilo.conf or your grub.conf file
echo located in the /boot directory. Copy the kernel entries and replace kernel with
echo the bzImage file and the initrd entry with System.map

-----------------------------------------------------------------------------------------------
 

Hope this script is used by a lot of people ................ Thats all a good programmer will hope for .............................. Purpose Served...

P.S If you modify or enchance this script plz post me a mail ...........

luv

Avinash Shankar



Got something to add? Send me email.





(OLDER)    <- More Stuff -> (NEWER)    (NEWEST)   

Printer Friendly Version

-> -> Automated Kernel Recompilation


4 comments



Increase ad revenue 50-250% with Ezoic


More Articles by © Avinash Shankar








Mon Mar 7 00:39:27 2005: 111   anonymous


sir i am i final year I.T and i am doing my final year project
topic:implementing ipsec to suport sctp over ipv4 in linux for that we have to compile the kernel to use fresswan but i have doubt since i dont know wheather compile kernel is just a configuring kernel or we are doing coding

reply back to:[email protected]



Mon Mar 7 10:35:40 2005: 114   TonyLawrence

gravatar
People don't "reply back". If you post a question somewhere, you come back to read it.

This is not programming, though it is scripting. You are in your final year and don't know that? That's scary..







Tue May 17 19:00:46 2005: 522   anonymous


hello

Since uptiol now i was using microsoft technologies but just 2 months ago i started to work on linux so i dont know about that if you have info please send it



Tue May 17 19:27:55 2005: 524   TonyLawrence

gravatar
We don't "send" anything. There is lots of stuff here and you can comment to ask questions if you don't understand something.

------------------------
Kerio Samepage


Have you tried Searching this site?

Unix/Linux/Mac OS X support by phone, email or on-site: Support Rates

This is a Unix/Linux resource website. It contains technical articles about Unix, Linux and general computing related subjects, opinion, news, help files, how-to's, tutorials and more.

Contact us





Writing in C or C++ is like running a chain saw with all the safety guards removed. (Bob Gray)

A crowded police docket is the surest of all signs that trade is brisk and money plenty. (Mark Twain)












This post tagged: