LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 12-03-2003, 02:20 PM   #1
Hady
Member
 
Registered: Nov 2003
Posts: 55

Rep: Reputation: 15
Recompile Kernel


Hi!
I have Red Hat Linux 8.0, Boot Loader LILO,
I have almost all the packages installed including the kernel code.

Can someone give me a detailed Step-by-Step instruction on
how to recompile the kernel?
(Of course, I don't want to replace or overwrite the original one)

Thanks,

Hady
 
Old 12-03-2003, 02:39 PM   #2
nibbler
Member
 
Registered: Oct 2003
Location: Croatia
Distribution: Fedora 4
Posts: 46

Rep: Reputation: 15
Have you tried google for KERNEL HOWTO?
 
Old 12-03-2003, 02:55 PM   #3
Skyline
Senior Member
 
Registered: Jun 2003
Distribution: Debian/other
Posts: 2,104

Rep: Reputation: 45
Da One's from the top of the Slack forum on this site will give you an idea..

http://www.linuxquestions.org/questi...threadid=49035
 
Old 12-03-2003, 02:59 PM   #4
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
also look in...../usr/src/linux(version)/documentation
this directory is 5+ megs with all sorts of Info about the kernel
including how to compile it!!
 
Old 12-03-2003, 04:49 PM   #5
h/w
Senior Member
 
Registered: Mar 2003
Location: New York, NY
Distribution: Debian Testing
Posts: 1,286

Rep: Reputation: 46
Code:
mkdir mykernel
cd mykernel
tar zjxvf linux-2.6.x.tar.bz2
cd /usr/src
su
ln -s <path_to_mykernel>/linux-2.6.x linux
exit
cd linux
make clean        -|     not needed for first time, but no harm typing it  :)
make mrproper    -|
make xconfig   OR    make menuconfig
        -- save config here before exiting
make        -- for <2.6 kernel, do:  make dep   THEN   make bzImage
make modules
su
make modules_install
cp arch/i386/boot/bzImage /boot/vmlinuz-2.whatever-you-want
cp System.map /boot/System.map-whatever-you-want
cd /boot
ln -s System.map-whatever-you-want System.map

now edit lilo.conf:
image=/boot/vmlinuz-2.whatever-you-named-above

copy the rest.


just go through what they are supposed to do from some readme before you actually follow it. find out if there are some distro-specific steps. but thats the general procedure.
hope that helps.

some tip(s): dont unzip and have ur source dir under /usr/src. just have a symbolic link 'linux' under /usr/src to wherever u unzipped it.
do everything as ur regular user, not as root. only creating that symbolic link under /usr/src, and make modules_install (and what follows) require root privilege.
make sure u copy vmlinux to the right place. i dont think all distro's require it under /boot (does any require it under '/'?) - just check that.
make sure lilo.conf has "root=/dev/hdaxx" pointing to the right one. to make sure which is root on ur machine, check using "cat /etc/fstab" and see where "/" is.

i think thats it.

Last edited by h/w; 01-06-2004 at 06:45 PM.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
how to recompile kernel 2.4.21-15.EL zameer_india Linux - Newbie 2 12-24-2004 01:02 AM
kernel recompile error (kernel panic) tombaaaaa Linux - Newbie 4 08-04-2004 04:32 PM
Recompile kernel 2.6 heema Linux - General 3 05-26-2004 10:29 AM
9.2 kernel recompile dukeinlondon Mandriva 3 11-10-2003 06:34 AM
Recompile Kernel ? Amerist Linux - Newbie 5 04-16-2002 04:13 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 05:08 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration