LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 10-08-2005, 09:51 AM   #1
RySk8er30
Member
 
Registered: Jul 2004
Location: Buffalo, NY
Distribution: Mandriva 2005LE
Posts: 274

Rep: Reputation: 30
Recompile Kernel


Hi,

I am currently running Mandriva 2005 LE. I want to recompile my kernel (2.6.11-6mdk) as I believe this will speed up my system (please correct me if I am wrong).

Could someone please provide me with the steps needed to recompile my kernel. Here is what I think I need to do:

cd /usr/src/linux
su - (password)
make mrproper
make clean
make xconfig
make dep
make bzImage

After this, what do I do?

When I run the make xconfig, does a dot next to the item (as opposed to a check) mean that it's selected or not? Also, I don't want to mess anything up. I unchecked obvious things (ISA support, Bluetooth support, etc). Is there anything I can change (check/uncheck) to help out?

Thanks.

Ryan
 
Old 10-08-2005, 01:30 PM   #2
GUIPenguin
Member
 
Registered: Aug 2004
Location: Maine
Distribution: Gentoo Linux
Posts: 239

Rep: Reputation: 30
then you'll need to cp your bzImage to /boot

Code:
cp arch/i386/boot/bzImage /boot/whatever
if your using grub or lilo edit the config to correspond to your kernel, (prob best to make 2 entries and keep your old kernel in there incase the new kernel fails.)

EDIT: I have never done make bzimage before, with gentoo I just do make && make modules_install and then I cp my bzImage to /boot

Last edited by GUIPenguin; 10-08-2005 at 01:45 PM.
 
Old 10-08-2005, 02:14 PM   #3
dracolich
Senior Member
 
Registered: Jul 2005
Distribution: Slackware
Posts: 1,274

Rep: Reputation: 63
You'll probably want to do make dep && make modules_install. You also get a System.map file that you need to copy to /boot. It appears in the directory where you execute make xconfig from, not where the new kernel is.

I agree with GUIPenguin's suggestion to keep your old kernel in the bootloader in case the new one doesn't work quite right.

If you just want to fine tune your kernel for performance it helps to know a lot about your hardware, especially specific chipsets. For example, not just what type of soundcard you have, but the type of chip that controls it. And if you have USBv1.1 or 2.0. 1.1 uses the ohci driver while 2.0 uses ehci so you only need one or the other. Try not to include everything builtin, only the most important things, and make the rest modules. This will keep your kernel smaller so it'll load faster. If you use lilo as the bootloader you can include compact and lba32 options to load the kernel faster also. I don't know if grub has equivalents.
 
Old 10-08-2005, 11:57 PM   #4
cs-cam
Senior Member
 
Registered: May 2004
Location: Australia
Distribution: Gentoo
Posts: 3,545

Rep: Reputation: 57
Here's how I compile my kernel recently due to an update in the patchset I use that I wanted.
Code:
cd /usr/src
tar -xvjf linux-2.6.13.tar.bz2
cd linux-2.6.13
bunzip2 patch-2.6.13-archck7.bz2
patch -Np1 -i patch-2.6.13-archck7
make menuconfig
make
make modules_install
cp arch/i386/boot/bzImage /boot/kernel-2.6.13-archck7
cp .config /boot/config-2.6.13-archck7
You don't need to worry about the patch stuff, once you've done that you'll need to edit /boot/grub/menu.lst.
 
  


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 On
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
Should I recompile my kernel? Guitarist88 Linux - Newbie 3 05-31-2004 04:28 PM
recompile the kernel!!! :O HELP! gangster_god Mandriva 3 04-06-2004 03:42 PM
what is recompile kernel? len Linux - Newbie 1 06-22-2003 10:18 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 01:56 PM.

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